Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
自从过去 4 个小时以来,我一直在使用 JFormDesigner,要让它适用于所有尺寸的屏幕非常困难。我需要的是我需要将设计的 JFrame 窗口大小设置为全屏,这样我的设计在不同大小的计算机上运行时不会分心。请有人在这方面帮助我。谢谢。
您需要获取屏幕大小并调整框架大小。
JFrame frame = new JFrame(); frame.setVisible(true); frame.setSize(Toolkit.getDefaultToolkit().getScreenSize());
希望能帮助到你:)