Bob,

- getPasswordAuthentication() is a public method of some class.
- takes no paramters.
- returns an object of type PasswordAuthentication (defined somewhere else)

I think once you understand how inner classes work, they should not be 
difficult to read. Inner classes are espacially useful and handy in GUI apps 
for Event handling code.

Hope the above helps.

Asim

>From: "Mike Bresnahan" <mbresnah at visi.com>
>To: <tclug-devel at mn-linux.org>
>Subject: RE: [TCLUG-DEVEL] Inner, anonymous classes?
>Date: Wed, 23 Jan 2002 12:00:49 -0800
>
>No, that is a function you've shown.  An anonymous inner class looks like
>this:
>
>public class Foobar {
>     public static void main( String args[]) {
>         BaseClass baseClass = new BaseClass() {
>                 public void doit() {
>                     System.out.println("Hello, World!");
>                 }
>             };
>         baseClass.doit();
>     }
>}
>
>interface BaseClass {
>     void doit();
>}
>
>In this example I create an anonymous class derived from BaseClass.
>
>Mike
>
> > -----Original Message-----
> > From: tclug-devel-admin at mn-linux.org
> > [mailto:tclug-devel-admin at mn-linux.org]On Behalf Of Bob Tanner
> > Sent: Wednesday, January 23, 2002 12:59 AM
> > To: tclug-devel at mn-linux.org
> > Subject: [TCLUG-DEVEL] Inner, anonymous classes?
> >
> >
> > Is it just me or are inner-anonymous classes just hard to read?
> >
> > I believe this is an inner-anonymous class?
> >
> >   public PasswordAuthentication
> >     getPasswordAuthentication() {
> >       String username, password;
> >
> >       String result = JOptionPane.showInputDialog("Enter
> > 'username,password'");
> >
> >       StringTokenizer st = new StringTokenizer(result, ",");
> >       username = st.nextToken();
> >       password = st.nextToken();
> >
> >       return new PasswordAuthentication(username, password);
> >   }
> >
> > I'm not sure how to read this code.
> >
> > Anyone wanna give this a chatty interpretation?
> >
> >
> > --
> > Bob Tanner <tanner at real-time.com>         | Phone : (952)943-8700
> > http://www.mn-linux.org, Minnesota, Linux | Fax   : (952)943-8500
> > Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9
> >
> > _______________________________________________
> > tclug-devel mailing list
> > tclug-devel at mn-linux.org
> > https://mailman.mn-linux.org/mailman/listinfo/tclug-devel
>
>_______________________________________________
>tclug-devel mailing list
>tclug-devel at mn-linux.org
>https://mailman.mn-linux.org/mailman/listinfo/tclug-devel


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx