This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 37950
    
  22
Welcome to JavaRanch Ameer Tamboli
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to restore jinternalframe to its normal state
 
Similar Threads
JInternalFrame not fit on desktopPane in full size
Reinitialising a JInternalFrame
How to listen the maximize button of the JInternalFrame event?
Overriding Swing primitives
Closing JInternalFrame