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.
我想知道如何在点击时制作一个 jbutton,最小化一个 jpanel。我几乎在构建自己的标题栏,所以我需要它是自定义的,而不是内置的。谢谢。
为了清楚起见,我需要它来完成窗口标题栏上的“-”按钮的作用。
要最小化框架:
frame.setState(JFrame.ICONIFIED);
规范化
frame.setState(JFrame.NORMAL);