import java.awt.*;
import javax.swing.*;
public class SwingG {
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable(){
public void run(){
SimpleFrame frame=new SimpleFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
});
}
}
class SimpleFrame extends JFrame{
private static final int d=300;
private static final int h=200;
public SimpleFrame(){
setSize(d,h);
}
}
java 简单的窗口程序之创建框架
最新推荐文章于 2024-09-17 23:10:51 发布