title: Open new panel with button clicked
body: <p>Java Swing GUI:</p>
  
  <p>I am using ActionListener to preform the action when a button is clicked. What i want to do is when a button is clicked, open a new panel, but load/get the new panel from a different file.</p>
  
  <p>This is what i have so far but i rather just link to another file. THANKS! =]</p>
  
  <pre><code>   public void actionPerformed(java.awt.event.ActionEvent e) {
                      //something like this...
                      loadFile(newPlane.java);
  }
  </code></pre>
  
  <h3>Update:</h3>
  
  <pre><code>        inventoryDisplay.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
              inventoryDisplayActionPerformed(evt);
          }
  
  
          private void inventoryDisplayActionPerformed(java.awt.event.ActionEvent evt) {
          //open a new panel by opening a new file ex: inventory.java  
          }
  </code></pre>
  
  <p>the reason im asking this is because when im creating a GUI program with netbeans... i have no idea how to make a new planel with the "design view" when the button is clinked.  Since netbeans only displays the main panel.</p>