我得到构造函数Object(String)未定义 on" super(" title")"。它不仅仅是这段代码,我创建的每一个程序,包含" super"有错误,这让我相信,问题是一般性的(日食/缺少导入)。 谢谢
import java.awt.Color;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.ButtonGroup;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JCheckBox;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.ListSelectionModel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JRadioButton;
import javax.swing.event.ListSelectionListener;
import javax.swing.JScrollPane;
public class MouseEventHandling {
private JPanel mousepanel;
private JLabel statusbar;
public MouseEventHandling() {
super("title");
mousepanel = new JPanel();
mousepanel.setBackground(Color.WHITE);
}
}
答案 0 :(得分:1)
您应该从JFrame
扩展您的课程