新生求教 构造一个最简单的Frame 下面这段代码是我照着书本打的,用myeclipse运行,系统提示Frame cannot be resolved to a type 这是什么原因啊? import javax.swing.*; class SimpleFrame extends JFrame { public static void main(String[] args) { // TODO Auto-generated method stub Frame frame=new Frame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.show(); } public Frame() { setTitle("hello"); setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);
} public static final int DEFAULT_WIDTH=300; public static final int DEFAULT_HEIGHT=200;