How to minimize a JFrame window from Java?

Frank picture Frank · Oct 19, 2010 · Viewed 55.5k times · Source

In my Java app, I have a JFrame window, how can I minimize it from my Java program ?

Answer

Brad Mace picture Brad Mace · Oct 19, 2010

minimize with frame.setState(Frame.ICONIFIED)

restore with frame.setState(Frame.NORMAL)