importjava.awt.EventQueue;importjava.awt.event.ComponentAdapter;importjava.awt.event.ComponentEvent;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JButton;importjavax.swing.JTextField;public classTest {privateJFrame frame;privateJTextField textField;public static voidmain(String[] args) {
EventQueue.invokeLater(newRunnable() {public voidrun() {try{
Test window= newTest();
window.frame.setVisible(true);
}catch(Exception e) {
e.printStackTrace();
}
}
});
}publicTest() {
initialize();
}private voidinitialize() {
frame= newJFrame();
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);//清空布局
JLabel label= new JLabel("标签");
label.setBounds(81, 63, 61,