| Author |
Positioning JOptionPane on the screen
|
Rus Corina
Ranch Hand
Joined: Jul 08, 2011
Posts: 90
|
|
|
I have a frame, which occupies almost all the screen, and at some point, if you press some buttons, a JOptionPane opens with a message. The problem is that the JOptionPane opens right below the end of my Frame, and only a very small part of it is visible. Does anybody know if I can modify the position of a JOptionPane on the screen? I want to put it in the center.
|
 |
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1791
|
|
|
The JOptionPane is centered on whatever component you specify as the parent component. Try using the frame as the parent component.
|
 |
Rus Corina
Ranch Hand
Joined: Jul 08, 2011
Posts: 90
|
|
|
I added the frame to a scrollbar, and I specified the scrollbar as parent component
|
 |
 |
|
|
subject: Positioning JOptionPane on the screen
|
|
|