aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to restore jinternalframe to its normal state Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to restore jinternalframe to its normal state" Watch "how to restore jinternalframe to its normal state" New topic
Author

how to restore jinternalframe to its normal state

narayana murthy pedapudi
Ranch Hand

Joined: Jul 23, 2003
Posts: 42
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

Joined: Jul 03, 2001
Posts: 2120
internalFrame.getDesktopPane().getDesktopManager().deiconifyFrame(
internalframe);
this works ok


SCJP2. Please Indent your code using UBB Code
Ameer Tamboli
Greenhorn

Joined: Oct 10, 2002
Posts: 2
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();

Speeding has never killed anybody, what kills you is suddenly becoming stationary.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40061
    
  28
Welcome to JavaRanch Ameer Tamboli
 
 
subject: how to restore jinternalframe to its normal state