[英]JButton minimizing a window(JFrame)
Im trying to create my own Frame for my application. 我正在尝试为我的应用程序创建自己的框架。 I have removed the standard Frame by using
setUndecorated(true)
. 我已经使用
setUndecorated(true)
删除了标准Frame。 I have a working exit button (not that difficult), but i want to have a JButton equal to the windows-minimizing-button in the top-right corner. 我有一个工作的退出按钮(不是那么困难),但是我想拥有一个JButton,它等于右上角的windows-minimizing-button。 I have tried several solutions as
hide()
, HIDE_ON_CLOSE
and even setVisible()
. 我尝试了几种解决方案,例如
hide()
, HIDE_ON_CLOSE
甚至setVisible()
。 But non of them is giving me the wanted result. 但是他们都不给我想要的结果。
Im extending a JFrame to my class. 我将JFrame扩展到我的班级。
I am thinking of some Mouselistener(?), but im like a big question mark right now. 我在想一些Mouselistener(?),但是我现在就像一个大问号。
http://www.google.com/search?q=jframe+minimize http://www.google.com/search?q=jframe+最小化
1st link: 第一个链接:
http://java-puzzle.blogspot.com/2009/07/tutorial-to-minimize-jframe-dynamically.html http://java-puzzle.blogspot.com/2009/07/tutorial-to-minimize-jframe-dynamically.html
frame.setExtendedState(JFrame.ICONIFIED);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.