• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to restore jinternalframe to its normal state

 
narayana murthy pedapudi
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
In my project i have used setExtendedState(JFrame.Normal) to get the jframe to its normal state which works very much fine. I would like to do the same for JInternalFrame. Is there any method to do so.
Plz let me know..
Thanks and Regards
Narayana Murthy
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
internalFrame.getDesktopPane().getDesktopManager().deiconifyFrame(
internalframe);
this works ok
 
Ameer Tamboli
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works, but it requires two clicks to iconify the window again.
The solution worked for me is:

internalFrame.setSelected(true);
internalFrame.getDesktopPane().getDesktopManager().deiconifyFrame(internalFrame);
internalFrame.getDesktopPane().getDesktopManager().maximizeFrame(internalFrame);
internalFrame.getDesktopPane().getDesktopManager().minimizeFrame(internalFrame);
internalFrame.moveToFront();
 
Campbell Ritchie
Sheriff
Pie
Posts: 49808
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch Ameer Tamboli
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic