In JInternalFrame we should not call hide() but call setVisible(false)
instead. The difference is that we override setVisible() in JComponent
and queue a repaint request for the parent, so that the hiding actually
becomes visible.

2006-02-15  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/JInternalFrame.java
        (dispose): Call setVisible(false) instead of hide.
        (doDefaultCloseOperation): Likewise.

/Roman
Index: javax/swing/JInternalFrame.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JInternalFrame.java,v
retrieving revision 1.23
diff -u -r1.23 JInternalFrame.java
--- javax/swing/JInternalFrame.java	22 Dec 2005 20:58:29 -0000	1.23
+++ javax/swing/JInternalFrame.java	15 Feb 2006 17:21:07 -0000
@@ -616,7 +616,7 @@
    */
   public void dispose()
   {
-    hide();
+    setVisible(false);
     JDesktopPane pane = getDesktopPane();
     if (pane != null)
       pane.setSelectedFrame(null);
@@ -647,11 +647,11 @@
     switch (getDefaultCloseOperation())
       {
       case HIDE_ON_CLOSE:
-	hide();
-	break;
+	    setVisible(false);
+	    break;
       case DISPOSE_ON_CLOSE:
-	dispose();
-	break;
+	    dispose();
+	    break;
       }
   }
 

Reply via email to