创建JFrame窗体
public class TestJFrame {
public void CreatJFrame(){
JFrame jf=new JFrame("我的第一个JFrame窗体");
jf.setSize(500,300);
jf.setLocation(200,200);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jf.setVisible(true);
}
public static void main(String[] args) {
TestJFrame tjf=new TestJFrame();
tjf.CreatJFrame();
}
}