标签:居中 mamicode button oncommand efault private port user tco
只需亿小串代码,教你用java仿制qqpublic class GUIQQ extends JFrame {
// 用户名
private JTextField username;
// 密码
private JPasswordField password;
// 小容器
private JLabel jl1;
private JLabel jl2;
private JLabel jl3;
private JLabel jl4;
// 小按钮
private JButton bu1;
private JButton bu2;
private JButton bu3;
// 复选框
private JCheckBox jc1;
private JCheckBox jc2;
// 列表框
private JComboBox jcb;
/*
String sql ="secelt * from while name=‘"username"‘and psw‘"=userpassword‘"";
JOptionPane.showConfirmDialog(null,"您输入的用户名是"+getName);
}
}
});
jl1.add(jl2);
jl1.add(jl3);
jl1.add(jl4);
jl1.add(jc1);
jl1.add(jc2);
jl1.add(jcb);
jl1.add(bu1);
con.add(jl1);
con.add(username);
con.add(password);
}
public static void main(String[] args) {
// 实例化对象
GUIQQ qq = new GUIQQ();
}
}
标签:居中 mamicode button oncommand efault private port user tco
原文地址:https://blog.51cto.com/14623707/2470853