Reputation: 2148
I am developing the MDI application. JFrame as main window and JInternalFrame as child windows. How can I make sure that my internal frame has to re-size automatically when I increase/decrease the screen resolution.
Scenario: Internal frame is in restore mode and occupied the complete desktop size.
Now when I increase the screen resolution, I am able to see the additional desktop area that is not occupied by the internal frame.
Is there any way to auto re-size the internal frame according to resolution?
Upvotes: 0
Views: 1402
Reputation: 324207
Internal frame is in restore mode and occupied the complete desktop size.
The point of restore
mode is that the frame size doesn't automatically change. If you want it to automatically change then the frame should be in maximize
mode.
If you want to override the default behaviour then you can try adding a ComponentListener to the desktop pane. Whenever it's size changes you can then loop through all the internal frames and manually resize them.
Upvotes: 1