简体   繁体   English

如何最小化未修饰的JFrame?

[英]How to minimize an undecorated JFrame?

I want to minimize a JFrame ? 我想最小化一个JFrame吗?

Note: JFrame is set undecorated to true in Netbeans. 注意:在Netbeans中, JFrame设置为undecorated为true。

How to set minimize action for JFrame when clicked a JButton? 单击JButton时如何为JFrame设置最小化动作?

Not sure why you want to do this. 不知道为什么要这么做。 The frame already has to button to click. 框架已经必须单击按钮。 Why do you need another button? 为什么需要另一个按钮?

Anyway to change the state of the frame: 无论如何要更改框架的状态:

frame.setExtendedState( JFrame.ICONIFIED );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM