Aung Thet
Aung Thet

Reputation: 3600

how to do auto minimize in swing

I am testing some code using JWindow and that hide jframe, so I have to create minimize, maximize and close buttons for user friendly. How can I set state to frame when click on created buttons.

Upvotes: 1

Views: 130

Answers (1)

Maroun
Maroun

Reputation: 95968

See JFrame#setState. You can do:

myFrame.setState(Frame.ICONIFIED)

As the implementation of a listener of the buttons.

Upvotes: 4

Related Questions