Please help me. What is wrong with this code? I took it from a tutorial and is studying the syntax but it will not run. Something seems to be wrong with line 6. Thanks
Error messageimport java.awt.FlowLayout; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JButton; import javax.swing.JFrame; public class MoreFrame extends JFrame implements ActionListener; { private static final long serialVersionUID = 1L; public static void main(String[] args) { new MoreFrame ().setVisible(true); } private MoreFrame() { super("Tutorial =Rhoen MoreFrame"); setSize (600,600); setDefaultCloseOperation (EXIT_ON_CLOSE); setLayout (new FlowLayout()); JButton button = new JButton ("Click me"); button.addActionListener(this); add (button); } public void actionPerformed(ActionEvent e) { System.out.println("Button has been clicked"); } }
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at MoreFrame.main(MoreFrame.java:11)