title: Java actionlistener doesn't work
body: <p>I just started learning Java 1 week ago, and I'm a 100% totally beginner. In this code, I can't seem to be able to put an actionlistener/get one to work. I don't even know where/how/in what way to put it, despite reading dozens of tutorials. I've created a JFrame with a JPanel in it, and on the JPanel there's a button. So far so good (and working). But then, I want it to be so that if the button is clicked, another button appears. Thank you sooo much in advance!</p>
  
  <pre><code>import javax.swing.*;
  import javax.swing.event.*;
  import java.awt.*;
  import java.awt.event.*;
  public class Skeleton extends JFrame implements ActionListener {
  
      public static void main(String[] args) {
      //------------------------------------------------
      JFrame frame = new JFrame("Skeleton");
      JPanel panel = new JPanel();
  frame.setContentPane(panel);
      frame.setSize(600,600);
      frame.setResizable(false);
      frame.setVisible(true);
      frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
      frame.setLocationRelativeTo(null);
      JButton button = new JButton("This is a button.");
      JButton button2 = new JButton("Hello");
      panel.setLayout(null);
      button.setBounds(20,20,200,25);
      button2.setBounds(20,70,200,25);
      panel.add(button);
     //-------------------------------------------
  
  button.addMouseListener(this);
  
  
  }
  
  public void ActionPerformed(ActionEvent e) {
      System.out.println("Hello");
  
  }
  }
  </code></pre>