0

The class Newfile has a red zig zaggy line underneath it, The type Newfile must implement the inherited abstract method ActionListener.actionPerformed(ActionEvent).
What does this mean?
My code ^_^' :

import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JButton;
import javax.swing.JMenu;
import javax.swing.*;
import java.util.*;
public class tuna extends JFrame{
	private JButton load;
	private JButton save;
	private JButton newfile;
	public tuna(){
		super("Notes");
		setLayout(new FlowLayout());
		newfile = new JButton("New");
		load = new JButton("Load");
		save = new JButton("Save");
		add(newfile);
		add(load);
		add(save);
		class Newfile implements ActionListener{
			public void actionPeformed(ActionEvent e){
				JOptionPane.showMessageDialog(null, "This feature isn't available yet.");
			}
		}
	}
}

Please help anyone.

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by NormR1
0

The class Newfile must implement the inherited abstract method.
Read the API doc for that interface and make sure you have correctly coded the methods it defines.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.