import java.awt.EventQueue;import javax.swing.JFrame;
public class h extends JFrame { /**
* Launch the application
* @param args
*/
public static void main(String args[]) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
h frame = new h();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
} /**
* Create the frame
*/
public h() {
super();
setBounds(100, 100, 500, 375);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
}}
public class h extends JFrame { /**
* Launch the application
* @param args
*/
public static void main(String args[]) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
h frame = new h();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
} /**
* Create the frame
*/
public h() {
super();
setBounds(100, 100, 500, 375);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
}}
public static void main(String args[]) {
h frame = new h();
frame.setVisible(true);
}
这样就可以了
这应该能加快程序的速度,然而一楼却说这样不好,不太明白。
望高手指点。