import java.awt.BorderLayout;
public class Login extends JFrame {
private JPanel contentPane;
private JTextField textField;
private TextField passwordField;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Login frame = new Login();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public Login() {
setTitle("\u8D44\u4EA7\u6E05\u67E5\u7CFB\u7EDF");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 455, 274);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setLayout(new BorderLayout(0, 0));
setContentPane(contentPane);
JPanel panel = new JPanel();
contentPane.add(panel, BorderLayout.NORTH);
JLabel label = new JLabel("\u6B22\u8FCE\u4F7F\u7528\u5357\u4EAC\u6653\u5E84\u5B66\u9662\u8D44\u4EA7\u6E05\u67E5\u7CFB\u7EDF");
label.setFont(new Font("微软雅黑", Font.BOLD, 13));
panel.add(label);
JPanel panel_1 = new JPanel();
contentPane.add(panel_1, BorderLayout.CENTER);
JLabel label_1 = new JLabel("\u7528\u6237\u540D \uFF1A");
label_1.setFont(new Font("宋体", Font.BOLD, 12));
JLabel label_2 = new JLabel("\u5BC6 \u7801 \uFF1A");
label_2.setFont(new Font("宋体", Font.BOLD, 12));
textField = new JTextField();
textField.setColumns(10);
passwordField = new TextField();
passwordField.setEchoChar('*');
GroupLayout gl_panel_1 = new GroupLayout(panel_1);
gl_panel_1.setHorizontalGroup(
gl_panel_1.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_1.createSequentialGroup()
.addGap(94)
.addGroup(gl_panel_1.createParallelGroup(Alignment.TRAILING)
.addGroup(gl_panel_1.createSequentialGroup()
.addComponent(label_2)
.addGap(18)
.addComponent(passwordField, 118, 118, 118))
.addGroup(gl_panel_1.createSequentialGroup()
.addComponent(label_1)
.addGap(18)
.addComponent(textField, GroupLayout.PREFERRED_SIZE, 118, GroupLayout.PREFERRED_SIZE)))
详细解决方案
连接数据库的代码出现死循环,求大神帮助
热度:99 发布时间:2016-04-23 01:14:33.0
相关解决方案