tags:

views:

128

answers:

1

In java, message dialogs open in middle of the Frame window by default in java. I want open the message dialog in specified location. Is it possible.?

+2  A: 

Hi,

Yes is it possible using the setLocation method:

mydialog.setLocation(200,200);

But you must set the location before set the visible. Swing components can't dynamically re-generated after visibility. Just set the location before set visible to true.

Yannick L.
Yannick L: Thanks a lot..
Venkats