public class A1 {
public static void main(String[] args) {
JFrame w=new JFrame("11");
w.setVisible(true);
w.setSize(400, 600);
w.setDefaultCloseOperation(3);
MyPanel p=new MyPanel();
w.add(w);
}
}
class MyPanel extends JPanel{
public void paint (Graphics g){
g.fillOval(200, 200, 50, 50);
}
}
class MyPanel extends JPanel 这里为什么出错 显示 The hierarchy of the type MyPanel is inconsistent
|
|