title: JFrame not opening when a button is clicked
body: <p>I have two <code>JFrame</code>. </p>
  
  <ol>
  <li><code>public class Main extends JFrame</code> </li>
  <li><code>public class ColourOption extends JPanel implements ActionListener</code> which is then set up in a JFrame. </li>
  </ol>
  
  <p>I wanted to open the second JFrame when i click on button of first JFrame<br>
  <code>.setVisible()</code> is not working.  I also tried <code>revalidate()</code>, as well as <code>invalidate()</code>  , <code>validate()</code> in the second JFrame. </p>
  
  <p>What could be the reason for it to not work?</p>