|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I tried googling this problem with no luck. I have the main frame and a child frame. The child frame opens up outside the area the existing frame is in. So if the frame is in the middle of my screen, the new frame opens up in the top left corner of the screen. I do not actually want the frame inside the parent frame, just open up in front of it.
When I call something like this: Code:
JOptionPane.showMessageDialog(frame, "Please enter integer values only", "Error - Invalid input", JOptionPane.ERROR_MESSAGE); It opens perfectly, top left corner of the parent frame. How do I do this with a frame? Thanks! |
|
#2
|
|||
|
|||
|
If you just want to open another frame that is centered in front of the existing frame you may use getBounds/setBounds.
|
|
#3
|
|||
|
|||
|
Thanks
I will give that a go |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Problem opening a child frame |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|