Hi,
im writing a Java Bean which opens a small frame (not
only this, but here comes my problem).
the frame should be placed exactly under a label.
first i tried to get the location for the frame by
this.getX (+ ... .width) and this.getY.
This is fine, but don't take care for the location
of the container, in which the bean is placed.
So I altered the construcor to bean(Component c)
to get also c.getX and c.getY.
But this will only work, if the bean is placed directly in a frame.
The point is:
I cannot kow, in how many panels (panels in panels or frames)
the bean will find itself.
Is there a method to get the Screen x and y values or
some like this?
If anyone has a idea, that can help me out I would be grateful.
Thanks Wolfgang
Christian Kaufhold - 08 Sep 2003 23:24 GMT
Hello!
> I cannot kow, in how many panels (panels in panels or frames)
> the bean will find itself.
> Is there a method to get the Screen x and y values or
> some like this?
getLocationOnScreen
Christian