⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newdriver.java

📁 出租车管理系统,为本人毕业设计. 还请大家多多指教了
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package car;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
import javax.swing.*;
import java.awt.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.border.Border;
import javax.swing.border.EtchedBorder;
import java.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.Font;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;


public class Newdriver extends JFrame {
    DataBaseManager db = null;
    ResultSet r;
    public Newdriver() {
        try {
            jbInit();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

//    public static void main(String[] args) {
//        Newdriver Newdriver = new Newdriver();
//    }

    private void jbInit() throws Exception {
        jLabel1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel1.setBorder(border1);
        jLabel1.setText("  驾驶证号:");
        this.getContentPane().setLayout(xYLayout1);
        jLabel3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel3.setBorder(border2);
        jLabel3.setText("  性       别:");
        jLabel4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel4.setBorder(border5);
        jLabel4.setText("  驾证初领日:");
        jLabel5.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel5.setBorder(border3);
        jLabel5.setText("  身份证号:");
        positionid_t.setNextFocusableComponent(address_t);
        positionid_t.setText("");
        positionid_t.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                positionid_t_focusLost(e);
            }
        });
        jLabel6.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel6.setBorder(border6);
        jLabel6.setText("  家 庭 住 址:");
        address_t.setNextFocusableComponent(tel_t);
        address_t.setText("");
        address_t.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                address_t_focusLost(e);
            }
        });
        jLabel7.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel7.setBorder(border4);
        jLabel7.setText("  联系电话:");
        tel_t.setText("");
        tel_t.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                tel_t_focusLost(e);
            }
        });
        drivername_id.setText("");
        drivername_id.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                drivername_id_focusLost(e);
            }
        });
        jLabel2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel2.setBorder(border7);
        jLabel2.setText("  驾驶员姓名:");
        driveid_t.setNextFocusableComponent(drivername_id);
        driveid_t.setText("");
        driveid_t.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                driveid_t_focusLost(e);
            }
        });
        jButton2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButton2.setToolTipText("清  空");
        jButton2.addActionListener(new Newdriver_jButton2_actionAdapter(this));
        jButton3.setBackground(Color.white);
        jButton3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButton3.setToolTipText("返   回");
        jButton3.addActionListener(new Newdriver_jButton3_actionAdapter(this));
        this.setTitle("沈阳志远出租汽车公司出租车信息管理系统--添加驾驶员窗口");
        jLabel10.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel10.setBorder(BorderFactory.createEtchedBorder());
        jLabel10.setText("  准 驾 类 型:");

        jComboBox1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jComboBox2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jComboBox2.addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent e) {
                jComboBox2_keyPressed(e);
            }
        });

        jComboBox1.addItem("    男");
        jComboBox1.addItem("    女");

        jComboBox2.addItem("  A1");
        jComboBox2.addItem("  A2");
        jComboBox2.addItem("  A3");
        jComboBox2.addItem("  B1");
        jComboBox2.addItem("  B2");
        jComboBox2.addItem("  C1");
        jComboBox2.addItem("  C2");
        jComboBox2.addItem("  C3");
        jComboBox2.addItem("  C4");
        jComboBox2.addItem("  D");
        jComboBox2.addItem("  E");
        jComboBox2.addItem("  F");
        jComboBox2.addItem("  M");
        jComboBox2.addItem("  N");
        jComboBox2.addItem("  P");

        jComboBox3.addItem("   汉    族");
        jComboBox3.addItem("   满    族");
        jComboBox3.addItem("   蒙 古 族");
        jComboBox3.addItem("   回    族");

        jComboBox4.addItem("    硕    士");
        jComboBox4.addItem("    研 究 生");
        jComboBox4.addItem("    本    科");
        jComboBox4.addItem("    大    专");
        jComboBox4.addItem("    高    中");
        jComboBox4.addItem("    中    专");
        jComboBox4.addItem("    初    中");

        jButton1.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                jButton1_actionPerformed(e);
            }
        });
        firsttakedate_t.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                firsttakedate_t_focusLost(e);
            }
        });
        jLabel9.setText("jLabel9");
        jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButton1.setToolTipText("添  加");
        xYLayout1.setWidth(542);
        xYLayout1.setHeight(461);
        jComboBox3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel8.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel8.setBorder(border2);
        jLabel8.setText("  民          族:");
        jComboBox4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jComboBox4.setNextFocusableComponent(firsttakedate_t);
        jLabel11.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel11.setBorder(BorderFactory.createEtchedBorder());
        jLabel11.setText("  文化程度:");
        firsttakedate_t.setNextFocusableComponent(positionid_t);
        this.getContentPane().add(driveid_t, new XYConstraints(135, 55, 105, 34));
        this.getContentPane().add(jLabel1, new XYConstraints(50, 55, 83, 34));
        this.getContentPane().add(jLabel2, new XYConstraints(289, 56, 97, 35));
        this.getContentPane().add(drivername_id,
                                  new XYConstraints(389, 56, 105, 34));
        this.getContentPane().add(jLabel4, new XYConstraints(289, 159, -1, 35));
        this.getContentPane().add(firsttakedate_t,
                                  new XYConstraints(389, 160, 105, 34));
        this.getContentPane().add(jComboBox4,
                                  new XYConstraints(135, 160, 105, 34));
        this.getContentPane().add(jLabel3, new XYConstraints(50, 106, 83, 34));
        this.getContentPane().add(jComboBox1,
                                  new XYConstraints(135, 105, 105, 34));
        this.getContentPane().add(jComboBox3,
                                  new XYConstraints(389, 105, 105, 34));
        this.getContentPane().add(jLabel8, new XYConstraints(289, 106, 97, 34));
        this.getContentPane().add(jLabel6, new XYConstraints(289, 215, 96, 34));
        this.getContentPane().add(jLabel7, new XYConstraints(49, 269, 83, 34));
        this.getContentPane().add(tel_t, new XYConstraints(134, 269, 105, 34));
        this.getContentPane().add(jLabel10, new XYConstraints(288, 269, 96, 34));
        this.getContentPane().add(jComboBox2,
                                  new XYConstraints(389, 269, 105, 33));
        this.getContentPane().add(address_t,
                                  new XYConstraints(390, 215, 104, 34));
        this.getContentPane().add(positionid_t,
                                  new XYConstraints(136, 215, 105, 34));
        this.getContentPane().add(jLabel5, new XYConstraints(51, 215, 83, 34));
        this.getContentPane().add(jLabel11, new XYConstraints(50, 160, 83, 34));
        this.getContentPane().add(jButton2, new XYConstraints(367, 369, 96, 52));
        this.getContentPane().add(jButton1, new XYConstraints(83, 369, 94, 52));
        this.getContentPane().add(jButton3, new XYConstraints(223, 369, 100, 52));
        this.setVisible(true);
        this.setSize(542, 490);
        this.setLocation(170, 50);

        addWindowListener(new WindowAdapter() {
            public void WindowClosing(WindowEvent e) {
                if (db != null)
                    db.closeConnection();
                dispose();
            }
        });
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -