title: How to open new JFrame when clicking JButton?
body: <p>I have a simple problem with opening a new <code>JFrame</code> called <code>focalSumFrame</code> while clicking on <code>JButton</code> called <code>focalSum</code>. I am working in netBeans IDE. My code looks like this: </p>
  
  <pre><code>private void focalSumActionPerformed(java.awt.event.ActionEvent evt) {                                         
      focalSumFrame.pack();
      focalSumFrame.setVisible(true);   
  }
  </code></pre>