title: Internalframe size is not always maximized ( alternating)
body: <p>I am facing a weird issue that I can't see to understand why. I have a frame with an Internal JFrame that opens upon  a menu click. This internal frame is supposed to be always maximized. When I run the program and click on the menu then it does what is expected. If I close the internal jframe and click the button again, the internal jframe is minimized. If I close it and click the button then it is maximimzed!! Why is it alternating like that. Here is the code that open the internal jframe. This method is inside the JFrame class   </p>
  
  <pre><code> private void onButtonClick(){
          InternalFrameProp intFrame = new InternalFrameProp ();     
          intFrame.setVisible(true);
          jDesktopPane1.add(intFrame );
          try {
              intFrame .setMaximum(true);
          } catch (PropertyVetoException ex) {
              Logger.getLogger(MainHomePage.class.getName()).log(Level.SEVERE,   null, ex);
          }
  }
  </code></pre>