In Swing, we can hide JFrame
by using two methods:
frame.setVisible(false)
frame.setState(Frame.ICONIFIED)
The difference that I discover are:
frame.setVisible(false)
removes icon from taskbar whereasICONIFIED
doesn't.- We can add listener to
ICONIFIED
whereas we can't add it forframe.setVisible(false)
.
Is there other major difference I'm missing? Any ideas would be greatly appreciated.