title: The type 'xxx' must implement the inherited abstract method java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent)
body: <p>I am trying to compile my code, but I keep getting a compiling error that I do not know how to fix. The error occurs at the line</p>
  
  <pre><code>public class MovingSignPanel extends JPanel implements ActionListener {
  </code></pre>
  
  <p>and the error is</p>
  
  <pre><code>The type MovingSignPanel must implement the inherited abstract method java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent)
  </code></pre>
  
  <p>if one of you lovely people could help me it would be greatly appreciated.</p>
  
  <pre><code>import java.awt.*;
  import javax.swing.*;
  import java.awt.event.*;
  
  public class MovingSignPanel extends JPanel implements ActionListener {
  
      JButton move = new JButton("Move");
      JButton quit = new JButton("Quit");//create buttons 
      private int press;
      private int x;
      private int y;
      private String time;
  
      public void CityPanel() {
          press = 0;
          this.add(move);
          move.addActionListener(this);
          this.add(quit);
          quit.addActionListener(this);
          x = 5;
          y = 175;//will be starting place for sun
          time = "8 AM";//will be starting time
      }
  
      public void moveSun(ActionEvent e) {
          if (e.getSource() == move) {
              {
                  press = 0;
              }
              x = 5;
              y = 175;
              time = "8 AM";
              super.repaint();
          } else if (press == 1) {
              x = 100;
              y = 75;
              time = "10 AM";
              super.repaint();
          } else if (press == 2) {
              x = 250;
              y = 80;
              time = "12 PM";
              super.repaint();
          } else if (press == 3) {
              x = 350;
              y = 140;
              time = "2 pm";
              super.repaint();
          } else if (press == 4) {
              x = 415;
              y = 200;
              time = "4 PM";
              super.repaint();
          } else if (press == 5) {
              x = 465;
              y = 230;
              time = "6 PM";
              super.repaint();
          } else if (press == 6) {
              x = 500;
              y = 260;
              time = "8 PM";
              super.repaint();
          }
          press += 1;
      }
  
      public void paintComponent(Graphics g) {
          super.paintComponent(g);
          g.setColor(Color.black);//color for buildings
          g.drawRect(150, 275, 50, 80);
          g.drawRect(200, 250, 50, 100);//draw buildings
          g.drawRect(300, 300, 30, 60);
          g.drawRect(100, 275, 40, 40);
          g.drawLine(0, 350, 500, 350);
          g.drawString(time, x, y + 75);//gives time
          g.setColor(Color.yellow);//color for sun
          g.fillOval(x, y, 50, 50);//draws sun
      }
  }
  </code></pre>