import java.awt.*;
import javax.swing.*;
public class 窗口 extends JFrame{
package CreateJFrame
/**
* @param args
*/
public void CreateJFrame(String title){
JFrame jf=new JFrame(title);
Container container =jf.getContentPane();
JLabel jl=new JLabel("这是一个jframe窗体");
jl.setHorizontalAlignment(SwingConstants.CENTER);
container.add(jl);
container.setBackground(color.white);
jf.setVisible(true);
jf.setsize(200,150);
jf.setDefaultCloseOperation(WindowContents.EXIT_ON_CLOSE);
}
public static void main(String args[] ) {
// TODO Auto-generated method stub
new Exameple1().CreateJFrame("创建一个JFrame窗体");
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error, insert "enum Identifier" to complete EnumHeaderName
Syntax error, insert "EnumBody" to complete EnumDeclaration
Exameple1 cannot be resolved to a type
编写代码时报错,求大神解答一下