JDK-4151444 : Restore button doesn't work for JInternal Frame
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-06-23
  • Updated: 2003-03-03
  • Resolved: 2003-03-03
Related Reports
Duplicate :  
Relates :  
Description

Name: mf23781			Date: 06/23/98


When using JInternalFrames placed in a JDesktopPane, 
maximizing the frame,then minimize the frame, then 
maximizing the frame, then restoring the frame doesn't 
restore the internal frame. The restore button changes to a 
maximise button as it should do if the JInternalFrame was being
restored to its minimised state, but the JInternalFrame remains 
in the maximised state.

When using JInternalFrames placed in a JDesktopPane, minimizing the frame, followed by maximizing, followed by minimizing, followed by maximizing causes the frame to disappear. 
Source code follows: 
 
import java.awt.*;
import com.sun.java.swing.*; 
 
public class minmax 
{ 
    public static void main(String args[]) 
    { 
        try 
        {         
             UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());       
        } 
        catch (Exception e) 
        { 
        } 
        // build the main window 
        JFrame frame = new JFrame();       
        frame.setSize(new Dimension(600, 400));       
        JDesktopPane desktop = new JDesktopPane();       
        JPanel mainPanel = new JPanel();       
        mainPanel.setLayout(new BorderLayout());       
        mainPanel.add(BorderLayout.CENTER,desktop);       
        frame.setContentPane(mainPanel); 
        frame.setTitle("desktop");       
        frame.show(); 
        frame.validate(); 
        frame.repaint(); 
        // build some jinternal frames       
        JInternalFrame win1 = new JInternalFrame("win1", true, true, true, true); 
        win1.setBounds(new Rectangle(0, 0, 100, 100));       
        JInternalFrame win2 = new JInternalFrame("win2", true, true, true, true); 
        win2.setBounds(new Rectangle(0, 0, 100, 100)); 
        desktop.add(win1, desktop.DEFAULT_LAYER);       
        desktop.add(win2, desktop.DEFAULT_LAYER); 
   } 
} 

NB. This is the same test case as the one in bug 4150568 and
may be related.

======================================================================

Comments
EVALUATION i haven't been able to reproduce this under the latest builds. richard.schiavi@Eng 1998-07-09 Well, I have no problems reproducing this on Solaris. hania.gajewska@Eng 1999-04-20 I have fixed this problem on Solaris. I am waiting for my Windows build to finish to see if it's fixed there, too. hania.gajewska@Eng 1999-06-07 The DefaultDesktopManager and BasicInternalFrameTitlePaneUI don't correctly implement the behavior that Windows MDI frames do. A new bug has been opened regarding this and is in the process of being fixed and code reviewed. I will close this as a duplicate of 4424247. ###@###.### 2003-03-03
03-03-2003