Saturday, July 25, 2009

Tutorial to minimize JFrame dynamically in Java

There is a very easy way to achieve the above functionality in your application.

The following statement will help you to do the exactly same thing:-

JFrame f=new JFrame();
.................
.........
//Now somewhere you want to minimize your JFrame then use below code

f.setExtendedState(JFrame.ICONIFIED);

Your work is done now.
This way of minimizing is also known as Iconifing your JFrame..i.e. make an icon in the taskbar.

Hope you liked this article then please consider bookmarking it. Thanks!!

1 comment:

Write Your Comments..

Share this Page:-