如何处理不同的屏幕大小



在我的应用程序中,我使用一个JFrame和多个jpanel。我用setExtendedState()方法制作了JFrame全屏。在主jFrame中,我在运行时加载jpanels。当我加载jPanel时,我使用jPanel.setBound(0,01000500)。

这在1024 x 756大小的屏幕中看起来不错。但当屏幕大小改变时,jPanels看起来很小。是否可以保持包括其他组件在内的jPanels的比例。

我不喜欢使用JInternalFrame来处理MDI。因为当JInternalFrame最大化时,这看起来非常难看。

我在面板中使用空布局。

我建议您使用"GridBagLayout"

最新更新