开发者

JButton minimizing a window(JFrame)

开发者 https://www.devze.com 2023-04-12 16:20 出处:网络
Im trying to create my own Frame for my application. I have removed the standard Frame by using setUndecorated(true). I have a working exit button (not that difficult), but i want to have a JButton eq

Im trying to create my own Frame for my application. I have removed the standard Frame by using setUndecorated(true). 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. I have tried several solutions as hide(), HIDE_ON_CLOSE and even setVisible(). Bu开发者_开发百科t non of them is giving me the wanted result.

Im extending a JFrame to my class.

I am thinking of some Mouselistener(?), but im like a big question mark right now.

JButton minimizing a window(JFrame)


http://www.google.com/search?q=jframe+minimize

1st link:

http://java-puzzle.blogspot.com/2009/07/tutorial-to-minimize-jframe-dynamically.html

frame.setExtendedState(JFrame.ICONIFIED);

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号