我有这段代码:
//
public class LaunchScreen extends JFrame implements ActionListener {
private final JMenu commandMenu = new JMenu("Commands");
private final JMenuItem add = new JMenuItem("Add");
private final JMenuItem search = new JMenuItem("Search");
private final JMenuItem quit = new JMenuItem("Quit");
public LaunchScreen() {
super();
setSize(300, 300);
setTitle("Library Search");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
commandMenu.add(add);
commandMenu.add(search);
commandMenu.add(quit);
}
@Override
public void actionPerformed(ActionEvent e) {
}
}
之后的三行有警告super();
。这是什么意思?这个问题的其他答案对我没有帮助。