title: How do I Fix an Unresponsive Button Listener?
body: <p>I am currently working on a program that pulls tables from a website and converts them into csv files.  For some reason the JButton I put in the GUI to start the process is unresponsive. This version should open up a panel.  The button appears, but clicking it does nothing. How do I get my button to activate the action listener? My code is below.</p>
  
  <pre><code>package importfriendly;
  
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.io.IOException;
  
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  import javax.swing.JTextField;
  
  public class UserInterface extends JPanel implements ActionListener {
  
      /**
       * 
       */
      private static final long serialVersionUID = 7729565734298298985L;
      public UserInterface() {
          JLabel lab1 = new JLabel("Insert URL Here");
          lab1.setLocation(250, 0);
          JTextField jtf = new JTextField(20);
          jtf.setLocation(250, 50);
          JButton initiate = new JButton("Start");
          initiate.setLocation(250, 100);
          add(lab1);
          add(jtf);
          add(initiate);
          initiate.addActionListener(null);
  
          }
          // TODO Auto-generated constructor stub
  
  
      @Override
      public void actionPerformed(ActionEvent e) {
          // TODO Auto-generated method stub
          ;
          }
          JFrame frame2 = new JFrame("Loading");
          frame2.setSize(100, 200);
          frame2.setResizable(true);
          frame2.setVisible(true);
          frame2.setContentPane(new Loading_Panel());
          frame2.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
          frame2.setLocation(400, 500);
      }
  
  
  
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          JFrame frame = new JFrame("RazorScraper");
          frame.setSize(300, 300);
          frame.setResizable(true);
          frame.setVisible(true);
          frame.setContentPane(new UserInterface());
          frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
          frame.setLocation(400, 500);
      }
  }
  </code></pre>