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

📄 newcar.java~53~

📁 出租车管理系统,为本人毕业设计. 还请大家多多指教了
💻 JAVA~53~
📖 第 1 页 / 共 3 页
字号:
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.EtchedBorder;
import javax.swing.border.Border;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.sql.ResultSet;
import car.DataBaseManager;
import java.sql.*;
import java.awt.event.KeyEvent;

public class NewCar extends JFrame {
    public NewCar() {
        try {
            jbInit();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

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

    private void jbInit() throws Exception {
        this.setTitle("沈阳志远出租汽车公司出租车信息管理系统--新增车辆窗口");
        this.getContentPane().setLayout(xYLayout1);
        db = new DataBaseManager();

        jLabel3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel3.setForeground(Color.black);
        jLabel3.setBorder(BorderFactory.createEtchedBorder());
        jLabel3.setPreferredSize(new Dimension(96, 24));
        jLabel3.setText("  制  造  商:");
        jLabel4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel4.setForeground(Color.black);
        jLabel4.setBorder(BorderFactory.createEtchedBorder());
        jLabel4.setPreferredSize(new Dimension(96, 24));
        jLabel4.setText("  发动机号:");
        jLabel1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel1.setForeground(Color.black);
        jLabel1.setBorder(BorderFactory.createEtchedBorder());
        jLabel1.setPreferredSize(new Dimension(96, 24));
        jLabel1.setText("  车  牌  号:");
        actionid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        actionid_t.setForeground(Color.black);
        actionid_t.setNextFocusableComponent(under_t);
        actionid_t.setText("");
        actionid_t.addFocusListener(new NewCar_actionid_t_focusAdapter(this));
        jLabel2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel2.setForeground(Color.black);
        jLabel2.setBorder(BorderFactory.createEtchedBorder());
        jLabel2.setPreferredSize(new Dimension(96, 24));
        jLabel2.setText("  底盘编号:");
        under_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        under_t.setForeground(Color.black);
        under_t.setText("");
        under_t.addFocusListener(new NewCar_under_t_focusAdapter(this));
        factory_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        factory_t.setForeground(Color.black);
        factory_t.setNextFocusableComponent(actionid_t);
        factory_t.setText("");
        factory_t.addFocusListener(new NewCar_factory_t_focusAdapter(this));
        jLabel6.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel6.setForeground(Color.black);
        jLabel6.setBorder(BorderFactory.createEtchedBorder());
        jLabel6.setPreferredSize(new Dimension(96, 24));
        jLabel6.setText("  营运证号:");
        jLabel8.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel8.setForeground(Color.black);
        jLabel8.setBorder(BorderFactory.createEtchedBorder());
        jLabel8.setPreferredSize(new Dimension(96, 24));
        jLabel8.setText("  计价器号:");
        countmoney_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        countmoney_t.setForeground(Color.black);
        countmoney_t.setNextFocusableComponent(lightid_t);
        countmoney_t.setText("");
        countmoney_t.addFocusListener(new NewCar_countmoney_t_focusAdapter(this));
        countmoney_t.addActionListener(new NewCar_jTextField6_actionAdapter(this));
        jLabel5.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel5.setForeground(Color.black);
        jLabel5.setBorder(BorderFactory.createEtchedBorder());
        jLabel5.setPreferredSize(new Dimension(96, 24));
        jLabel5.setText("  燃油类型:");
        jLabel9.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel9.setForeground(Color.black);
        jLabel9.setBorder(BorderFactory.createEtchedBorder());
        jLabel9.setPreferredSize(new Dimension(96, 24));
        jLabel9.setText("  顶  灯  号:");
        lightid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        lightid_t.setForeground(Color.black);
        lightid_t.setNextFocusableComponent(drivername_t);
        lightid_t.setText("");
        lightid_t.addFocusListener(new NewCar_lightid_t_focusAdapter(this));
        jLabel10.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel10.setForeground(Color.black);
        jLabel10.setBorder(BorderFactory.createEtchedBorder());
        jLabel10.setText("  驾驶员姓名:");
        drivername_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        drivername_t.setForeground(Color.black);
        drivername_t.setNextFocusableComponent(driveid_t);
        drivername_t.setText("");
        drivername_t.addFocusListener(new NewCar_drivername_t_focusAdapter(this));
        jLabel11.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel11.setForeground(Color.black);
        jLabel11.setBorder(BorderFactory.createEtchedBorder());
        jLabel11.setPreferredSize(new Dimension(96, 24));
        jLabel11.setText("  驾驶证号:");
        driveid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        driveid_t.setForeground(Color.black);
        driveid_t.setNextFocusableComponent(yingdate);
        driveid_t.setText("");
        driveid_t.addFocusListener(new NewCar_driveid_t_focusAdapter(this));
        jLabel12.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel12.setForeground(Color.black);
        jLabel12.setBorder(BorderFactory.createEtchedBorder());
        jLabel12.setPreferredSize(new Dimension(96, 24));
        jLabel12.setText("  营审日期:");
        xYLayout1.setWidth(553);
        xYLayout1.setHeight(520);
        jLabel13.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel13.setForeground(Color.black);
        jLabel13.setBorder(BorderFactory.createEtchedBorder());
        jLabel13.setText("  次营审日期:");
        jLabel14.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel14.setForeground(Color.black);
        jLabel14.setBorder(BorderFactory.createEtchedBorder());
        jLabel14.setText("  年审日期:");
        jLabel15.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel15.setForeground(Color.black);
        jLabel15.setBorder(BorderFactory.createEtchedBorder());
        jLabel15.setPreferredSize(new Dimension(96, 24));
        jLabel15.setText("  下次年审:");
        jLabel16.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel16.setForeground(Color.black);
        jLabel16.setBorder(BorderFactory.createEtchedBorder());
        jLabel16.setText("  投保日期:");
        jLabel17.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel17.setForeground(Color.black);
        jLabel17.setBorder(BorderFactory.createEtchedBorder());
        jLabel17.setPreferredSize(new Dimension(96, 24));
        jLabel17.setText("  投保时长:");
        jLabel18.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel18.setForeground(Color.black);
        jLabel18.setBorder(BorderFactory.createEtchedBorder());
        jLabel18.setText("  车辆状态:");
        jLabel19.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jLabel19.setForeground(Color.black);
        jLabel19.setBorder(BorderFactory.createEtchedBorder());
        jLabel19.setPreferredSize(new Dimension(96, 24));
        jLabel19.setText("  违章次数:");
        breaklowcount_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        breaklowcount_t.setForeground(Color.black);
        breaklowcount_t.setNextFocusableComponent(jButton1);
        breaklowcount_t.setText("0");
        businessid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        businessid_t.setForeground(Color.black);
        businessid_t.setNextFocusableComponent(countmoney_t);
        businessid_t.addFocusListener(new NewCar_businessid_t_focusAdapter(this));
        carid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        carid_t.setForeground(Color.black);
        carid_t.setNextFocusableComponent(factory_t);
        carid_t.addFocusListener(new NewCar_carid_t_focusAdapter(this));
        jComboBox1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jComboBox1.setForeground(Color.black);
        jComboBox1.setNextFocusableComponent(businessid_t);
        jComboBox1.addItem("   汽    油");
        jComboBox1.addItem("   柴    油");
        jComboBox2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jComboBox2.setForeground(Color.black);
        jComboBox2.setNextFocusableComponent(breaklowcount_t);
        jComboBox2.addItem("   待    命");
        jComboBox2.addItem("   工 作 中");
        jComboBox2.addItem("   修 理 中");
        jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButton1.setForeground(Color.black);
        jButton1.setToolTipText("添  加");
        jButton1.addActionListener(new NewCar_jButton1_actionAdapter(this));
        jButton2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButton2.setForeground(Color.black);
        jButton2.setToolTipText("清  空");
        jButton2.addActionListener(new NewCar_jButton2_actionAdapter(this));
        jButton3.setBackground(Color.white);
        jButton3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        jButton3.setForeground(Color.black);
        jButton3.setToolTipText("返   回");
        jButton3.addActionListener(new NewCar_jButton3_actionAdapter(this));
        protecthour_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        protecthour_t.addFocusListener(new NewCar_protecthour_t_focusAdapter(this));
        yingdate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        yingdate.setNextFocusableComponent(nextyingdate);
        yingdate.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                yingdate_focusLost(e);
            }
        });
        yeardate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        yeardate.setNextFocusableComponent(nextyeardate);
        yeardate.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                yeardate_focusLost(e);
            }
        });
        toudate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        toudate.setNextFocusableComponent(protecthour_t);
        toudate.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                toudate_focusLost(e);
            }
        });
        nextyingdate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        nextyingdate.setNextFocusableComponent(yeardate);
        nextyingdate.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                nextyingdate_focusLost(e);
            }
        });
        nextyeardate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
        nextyeardate.setNextFocusableComponent(toudate);
        nextyeardate.addFocusListener(new FocusAdapter() {
            public void focusLost(FocusEvent e) {
                nextyeardate_focusLost(e);
            }
        });
        this.getContentPane().add(jLabel13, new XYConstraints(312, 266, -1, 31));
        this.getContentPane().add(jLabel2, new XYConstraints(312, 88, -1, 31));
        this.getContentPane().add(factory_t, new XYConstraints(411, 43, 97, 31));
        this.getContentPane().add(driveid_t, new XYConstraints(411, 222, 97, 31));
        this.getContentPane().add(businessid_t,
                                  new XYConstraints(411, 133, 97, 31));
        this.getContentPane().add(under_t, new XYConstraints(411, 88, 97, 31));
        this.getContentPane().add(lightid_t, new XYConstraints(411, 178, 97, 31));
        this.getContentPane().add(protecthour_t,
                                  new XYConstraints(410, 350, 96, 30));
        this.getContentPane().add(jLabel19, new XYConstraints(312, 390, 95, 32));
        this.getContentPane().add(jLabel17, new XYConstraints(312, 350, 95, 30));
        this.getContentPane().add(jLabel15, new XYConstraints(312, 309, 95, 30));
        this.getContentPane().add(jLabel3, new XYConstraints(312, 44, -1, 31));
        this.getContentPane().add(jLabel6, new XYConstraints(312, 133, -1, 31));
        this.getContentPane().add(jLabel9, new XYConstraints(312, 178, -1, 31));
        this.getContentPane().add(jLabel11, new XYConstraints(312, 222, -1, 31));
        this.getContentPane().add(jLabel5, new XYConstraints(39, 135, -1, 31));
        this.getContentPane().add(jLabel8, new XYConstraints(39, 180, -1, 31));
        this.getContentPane().add(jLabel10, new XYConstraints(39, 224, -1, 31));
        this.getContentPane().add(drivername_t,
                                  new XYConstraints(139, 223, 97, 31));
        this.getContentPane().add(countmoney_t,
                                  new XYConstraints(138, 180, 97, 31));
        this.getContentPane().add(jComboBox1,
                                  new XYConstraints(139, 135, 97, 31));
        this.getContentPane().add(actionid_t, new XYConstraints(138, 89, 97, 31));
        this.getContentPane().add(carid_t, new XYConstraints(139, 45, 97, 31));
        this.getContentPane().add(jLabel18, new XYConstraints(40, 391, 93, 31));
        this.getContentPane().add(jComboBox2,
                                  new XYConstraints(137, 391, 99, 31));
        this.getContentPane().add(jLabel14, new XYConstraints(40, 309, 94, 31));
        this.getContentPane().add(jLabel16, new XYConstraints(40, 350, 93, 32));
        this.getContentPane().add(jLabel12, new XYConstraints(40, 267, 95, 31));
        this.getContentPane().add(jLabel4, new XYConstraints(39, 89, -1, 31));
        this.getContentPane().add(jLabel1, new XYConstraints(39, 45, -1, 31));
        this.getContentPane().add(yingdate,
                                  new XYConstraints(139, 267, 97, 31));
        this.getContentPane().add(yeardate,
                                  new XYConstraints(138, 309, 98, 31));
        this.getContentPane().add(toudate,
                                  new XYConstraints(138, 350, 98, 32));
        this.getContentPane().add(nextyingdate,
                                  new XYConstraints(411, 266, 96, 30));
        this.getContentPane().add(nextyeardate,
                                  new XYConstraints(411, 309, 95, 30));
        this.getContentPane().add(breaklowcount_t,
                                  new XYConstraints(411, 390, 95, 31));
        this.getContentPane().add(jButton1, new XYConstraints(81, 453, 95, 47));
        this.getContentPane().add(jButton3, new XYConstraints(231, 453, 96, 47));
        this.getContentPane().add(jButton2, new XYConstraints(382, 454, 99, 47));
        this.setSize(553, 553);

⌨️ 快捷键说明

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