87 lines
2.5 KiB
Java
87 lines
2.5 KiB
Java
|
package exp7;
|
||
|
|
||
|
import java.awt.EventQueue;
|
||
|
|
||
|
import javax.swing.JFrame;
|
||
|
import javax.swing.JPanel;
|
||
|
import javax.swing.border.EmptyBorder;
|
||
|
import java.awt.GridBagLayout;
|
||
|
import javax.swing.JLabel;
|
||
|
import java.awt.GridBagConstraints;
|
||
|
import java.awt.Insets;
|
||
|
import javax.swing.JTextField;
|
||
|
|
||
|
public class qq extends JFrame {
|
||
|
|
||
|
private static final long serialVersionUID = 1L;
|
||
|
private JPanel contentPane;
|
||
|
private JTextField textField;
|
||
|
private JTextField textField_1;
|
||
|
|
||
|
/**
|
||
|
* Launch the application.
|
||
|
*/
|
||
|
public static void main(String[] args) {
|
||
|
EventQueue.invokeLater(new Runnable() {
|
||
|
public void run() {
|
||
|
try {
|
||
|
qq frame = new qq();
|
||
|
frame.setVisible(true);
|
||
|
} catch (Exception e) {
|
||
|
e.printStackTrace();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Create the frame.
|
||
|
*/
|
||
|
public qq() {
|
||
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||
|
setBounds(100, 100, 450, 300);
|
||
|
contentPane = new JPanel();
|
||
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||
|
|
||
|
setContentPane(contentPane);
|
||
|
GridBagLayout gbl_contentPane = new GridBagLayout();
|
||
|
gbl_contentPane.columnWidths = new int[]{0, 0, 0, 0, 0};
|
||
|
gbl_contentPane.rowHeights = new int[]{0, 0, 0, 0, 0};
|
||
|
gbl_contentPane.columnWeights = new double[]{0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
|
||
|
gbl_contentPane.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
|
||
|
contentPane.setLayout(gbl_contentPane);
|
||
|
|
||
|
JLabel lblNewLabel = new JLabel("账号");
|
||
|
GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
|
||
|
gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
|
||
|
gbc_lblNewLabel.gridx = 1;
|
||
|
gbc_lblNewLabel.gridy = 1;
|
||
|
contentPane.add(lblNewLabel, gbc_lblNewLabel);
|
||
|
|
||
|
textField = new JTextField();
|
||
|
GridBagConstraints gbc_textField = new GridBagConstraints();
|
||
|
gbc_textField.insets = new Insets(0, 0, 5, 0);
|
||
|
gbc_textField.fill = GridBagConstraints.HORIZONTAL;
|
||
|
gbc_textField.gridx = 3;
|
||
|
gbc_textField.gridy = 1;
|
||
|
contentPane.add(textField, gbc_textField);
|
||
|
textField.setColumns(10);
|
||
|
|
||
|
JLabel lblNewLabel_1 = new JLabel("密码");
|
||
|
GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
|
||
|
gbc_lblNewLabel_1.insets = new Insets(0, 0, 0, 5);
|
||
|
gbc_lblNewLabel_1.gridx = 1;
|
||
|
gbc_lblNewLabel_1.gridy = 3;
|
||
|
contentPane.add(lblNewLabel_1, gbc_lblNewLabel_1);
|
||
|
|
||
|
textField_1 = new JTextField();
|
||
|
GridBagConstraints gbc_textField_1 = new GridBagConstraints();
|
||
|
gbc_textField_1.fill = GridBagConstraints.HORIZONTAL;
|
||
|
gbc_textField_1.gridx = 3;
|
||
|
gbc_textField_1.gridy = 3;
|
||
|
contentPane.add(textField_1, gbc_textField_1);
|
||
|
textField_1.setColumns(10);
|
||
|
}
|
||
|
|
||
|
}
|