Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to maximize or revert a java jframe after I has minimized it?  RSS feed

 
jtl hartech
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In windwos, after I click the minimize button on the jframe, it will
disappear and go into the task bar.
how can I make it automaticly revert or maximize to show up after 5
seconds.

Thank you very much in advance.
 
Tony Docherty
Bartender
Posts: 3205
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a WindowStateListener to your frame so that you are notified when the frame has been minimised. Then start a javax.swing.Timer to resize the window after 'n' seconds (from memory this can be done by calling the frame's setExtendedState(..) method(), but check out the API docs for more info).
 
jtl hartech
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.. It works!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!