hello,
I have a problem with a JDialog that I'm trying to have appear on top
of a Frame.
I'm clicking a cell in JTable inside my JFrame, and I want the dialog
to appear right below this cell.
I'm computing the correct point of location for the JDialog, but I
witness a strange behavior:
- when I call "setLocation" before "setVisible", then the JDialog
appears in the middle of the screen (just like if there has not been
any "setLocation")
- when I call "setVisible" before "setLocation", the dialog appears,
THEN is moved to it's correct location. this is very fast, but it still
can be seen (like a flash), and is not very nice...
I'm surprised there's no "setVisible" method where I could specify
exactly WHERE to display my dialog...
any idea ?
thanks
Morten Alver - 03 Sep 2004 11:30 GMT
> - when I call "setLocation" before "setVisible", then the JDialog
> appears in the middle of the screen (just like if there has not been
> any "setLocation")
Have you tried with show() instead of setVisible() ? I don't know what
the differences are, but setting the location before showing the dialog
should work.
--
Morten
ak - 03 Sep 2004 16:05 GMT
> I have a problem with a JDialog that I'm trying to have appear on top
> of a Frame.
[quoted text clipped - 15 lines]
> I'm surprised there's no "setVisible" method where I could specify
> exactly WHERE to display my dialog...
Post your code.

Signature
Andrei Kouznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader