title: Program terminates after another class is called
body: <p>I am trying to design a Java Program which offers multiple things like Calculator and tetris game and many more. Both Calculator and Tetris game are written in Swing having GUI, but the main program is CLI. it presents options like press 1 for calculator , press 2 for tetris, etc. but as soon as I press 1 calculator launches in another window and my main program terminates. I want a method that my main program still gives options like press 1 for calculator , press 2 for tetris, etc. even when I close the GUI Calculator or Tetris Window. here's what I'm trying to do:</p>
  
  <pre><code>if (input == 1)
      {
          new Calc();
          mainScreen();
      }
  else if (input == 2)
      {
          new Tetris();
          mainScreen();
      }
      .
      .
      .
      And So On
  </code></pre>