title: type cannot be resolved
body: <p>heres my code:</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  
  
  public class FirstGui extends JFrame {
      private JLabel label;
      private JButton button;
  
      public FirstGui() {
  
          setLayout(new FlowLayout());
  
          button = new JButton("Click for sex");
          add(button);
  
          label = new JLabel("");
          add(label);
  
          event e = new event();
          button.addActionListener(e);
      }
  
      public class event implements ActionListener {
  
          public void actionPerformed(ActionEvent e) {
  
              label.setText("how you can see wors here");
  
          }
      }
  
      public static void main(String [] args) {
          FirstGui gui = new FirstGui();
  
          gui.setDefaultCloseOperation(EXIT_ON_CLOSE);
          gui.setSize(200, 200);
          gui.setTitle("Title");
          gui.setVisible(true);
  
      }   
  
  }
  </code></pre>
  
  <p>And it generates a errors:</p>
  
  <p>ActionEvent cannot be resolved to a type    FirstGui.java   /Test/src   line 26 Java Problem</p>
  
  <p>ActionListener cannot be resolved to a type FirstGui.java   /Test/src   line 24 Java Problem</p>
  
  <p>The method addActionListener(ActionListener) in the type AbstractButton is not applicable for the arguments (FirstGui.event)    FirstGui.java   /Test/src   line 21 Java Problem</p>
  
  <p>what is wrong with it??? im new to java.</p>