At 8:48 PM -0400 9/25/99, berry wrote:
>Hi,
>
>I was wondering if anyone knows what this following
>code means?
>
>public Rectangle getBounds() {
> return JFrame.this.getBounds();
>}
Hi Berry. I didn't feel like anyone has given a clear enough response here,
so in case you still don't see what's going on, this is how I understand it:
If you have an inner class (some non-public helper class usually for a class
like JFrame in this case) and you need access to the instantiated object of
the parent class's type which is associated with this inner class, it seems
impossible to get at it. Well, it turns out that you've stumbled across the
syntax for doing so. ParentClass.this will return you the object that
contains the inner class you are working within.
Hope this helps. It doesn't seem too useful, but it does in fact come in
quite handy occasionally (as in the Swing code. It doesn't surprise me that
you found it there at all!)
Take care.
Will
___________________________________________
Will Koffel Course 21M
(617) 225-6428 ~*_*~
[EMAIL PROTECTED] Course 6
MIT '00 http://web.mit.edu/wkoffel/www
-------------------------------------------
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]