jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java
changeset 36868 9d0d667bff5c
parent 36464 1b3f6e14e5ec
child 39538 8477ce4d6628
equal deleted inserted replaced
36867:d3169e0913e7 36868:9d0d667bff5c
   127                 // That method will handle the maximization of the frame.
   127                 // That method will handle the maximization of the frame.
   128                 f.setIcon(false);
   128                 f.setIcon(false);
   129             } catch (PropertyVetoException e2) {
   129             } catch (PropertyVetoException e2) {
   130             }
   130             }
   131         } else {
   131         } else {
       
   132             Container c = f.getParent();
       
   133             if (c == null) {
       
   134                 return;
       
   135             }
   132             f.setNormalBounds(f.getBounds());
   136             f.setNormalBounds(f.getBounds());
   133             Rectangle desktopBounds = f.getParent().getBounds();
   137             Rectangle desktopBounds = c.getBounds();
   134             setBoundsForFrame(f, 0, 0,
   138             setBoundsForFrame(f, 0, 0,
   135                 desktopBounds.width, desktopBounds.height);
   139                 desktopBounds.width, desktopBounds.height);
   136         }
   140         }
   137 
   141 
   138         // Set the maximized frame as selected.
   142         // Set the maximized frame as selected.