JAVA作业求解答 40
2个回答
展开全部
我的这个是用myeclipse编写的,编码格式utf-8
package cn;
public class Login extends javax.swing.JFrame {
/** Creates new form Login */
public Login() {
initComponents();
}
//GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox();
jLabel6 = new javax.swing.JLabel();
jComboBox2 = new javax.swing.JComboBox();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
jTextField5 = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
jCheckBox1 = new javax.swing.JCheckBox();
jCheckBox2 = new javax.swing.JCheckBox();
jCheckBox3 = new javax.swing.JCheckBox();
jCheckBox4 = new javax.swing.JCheckBox();
jCheckBox5 = new javax.swing.JCheckBox();
jCheckBox6 = new javax.swing.JCheckBox();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jPasswordField1 = new javax.swing.JPasswordField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabel1.setText("\u7528\u6237\u6ce8\u518c");
jLabel2.setText("\u59d3\u540d:");
jLabel3.setText("\u6027\u522b:");
jLabel4.setText("\u5bc6\u7801:");
jLabel5.setText("\u51fa\u751f:");
jComboBox1
.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
"1990", "1991", "1992", "1993", "1994", "1995", "1996",
"..." }));
jLabel6.setText("\u5e74");
jComboBox2
.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10",
"11", "12" }));
jLabel7.setText("\u6708");
jLabel8.setText("\u7535\u8bdd:");
jLabel9.setText("\u90ae\u7bb1:");
jLabel10.setText("\u5174\u8da3:");
jCheckBox1.setText("\u5403");
jCheckBox2.setText("\u559d");
jCheckBox3.setText("\u73a9");
jCheckBox4.setText("\u4e50");
jCheckBox5.setText("\u7968");
jCheckBox6.setText("\u8bfb");
jButton1.setText("\u6ce8\u518c");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.setText("\u53d6\u6d88");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(
jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout
.setHorizontalGroup(jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGap(
140,
140,
140)
.addComponent(
jLabel1))
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGap(
39,
39,
39)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(
jLabel3)
.addComponent(
jLabel2)
.addComponent(
jLabel4))
.addComponent(
jLabel5)
.addComponent(
jLabel8)
.addComponent(
jLabel9)
.addComponent(
jLabel10))
.addGap(
27,
27,
27)
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addComponent(
jCheckBox1)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jCheckBox2)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jCheckBox3)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jCheckBox4))
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addComponent(
jCheckBox5)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jCheckBox6))
.addGroup(
jPanel1Layout
.createParallelGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
false)
.addComponent(
jPasswordField1,
javax.swing.GroupLayout.Alignment.LEADING,
0,
0,
Short.MAX_VALUE)
.addComponent(
jTextField5,
javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
javax.swing.GroupLayout.Alignment.LEADING,
jPanel1Layout
.createSequentialGroup()
.addComponent(
jComboBox1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jLabel6)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jComboBox2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jLabel7))
.addComponent(
jTextField2,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(
jTextField1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE,
143,
Short.MAX_VALUE)
.addComponent(
jTextField4,
javax.swing.GroupLayout.Alignment.LEADING))))
.addGroup(
jPanel1Layout
.createSequentialGroup()
.addGap(
60,
60,
60)
.addComponent(
jButton1)
.addGap(
42,
42,
42)
.addComponent(
jButton2)))
.addContainerGap(50, Short.MAX_VALUE)));
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询