title: Implementing and calling JFrame/ActionListener class from main
body: <p>I'm trying to get my program to launch a gui that gathers information before the actual programs starts. In main I try to call the JFrame which should then run until the start button is pressed and then the main program should launch. Everything seems to be correct except for the base class of the initializeLauncher. Thanks!</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  import java.awt.event.*;
  
  class InitializeLauncher implements ActionListener {
  
      InitializeLauncher() {
          JFrame frame = new JFrame("launcherClient");
  
          Container c = frame.getContentPane();
          Dimension d = new Dimension(700,400);
          c.setPreferredSize(d);
  
          JButton startButton = new JButton("Start");
          JPanel pane = new JPanel();
  
          startButton.addActionListener(this);
  
          pane.add(startButton);
          frame.add(pane);
          frame.pack();
          frame.setLocationRelativeTo(null);
          frame.setResizable(false);
          frame.setVisible(true);
      }
  
      public void buttonClicked(ActionEvent e)
      {
          ApplicationDeploy displayExample = new ApplicationDeploy();
          displayExample.initializeGameClient();
      }
  }
  </code></pre>
  
  <p>...and then in main I call this:</p>
  
  <pre><code>InitializeLauncher launcher = new InitializeLauncher();
  launcher.InitializeLauncher();
  </code></pre>