berry wrote:

> Hi,
>
> I was wondering if anyone knows what this following
> code means?
>
> public Rectangle getBounds() {
>         return JFrame.this.getBounds();
> }

That sort of code is  used in inner classes.
One of the swing programmers seems to make a habit of it.
If you have a lot of inner classes I guess its a bit cleaner to qualify this
when you use it. Otherwise it can be confusing if there are several inner
classes
in a Class.

>
>
> >From what I can understand it is making an infinate series
> of recursive calls.  I find this kind of code all over  Sun's
> source.

Umm no its just a 1.1 qualified this the class qualifier is optional out side
of inner classes.

>
>
> Another question:
>
> With Swing classes, at what point is native code actually
> called to do drwing .  If you could tell me, I am wondering what classes it
> happens in and what is specifically happening. In 1.1 it would be
> the peer classes.

I know that one : )
swing uses
Canvas
Frame
Dialog
Window
The native peers are called there.

The native graphics object can draw all over the window.
It's fairly trivial to  get a  lightweight component to
draw outside of its bounds or over its sub components.
At least is the current JVM. I consider it something of
a security hole.


Mike



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to