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.
Joined: Jun 13, 2009
The JOptionPane is centered on whatever component you specify as the parent component. Try using the frame as the parent component.
Joined: Jul 08, 2011
I added the frame to a scrollbar, and I specified the scrollbar as parent component