0

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?

4

1 回答 1

1

内部框架处于恢复模式并占据整个桌面大小。

模式的重点restore是帧大小不会自动改变。如果您希望它自动更改,则框架应处于maximize模式。

如果要覆盖默认行为,则可以尝试将 ComponentListener 添加到桌面窗格。每当它的大小发生变化时,您就可以遍历所有内部框架并手动调整它们的大小。

于 2013-10-02T14:47:17.583 回答