📄 updatecar.java
字号:
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.TitledBorder;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
public class UpdateCar extends JFrame {
public UpdateCar() {
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
// public static void main(String[] args) {
// UpdateCar updateCar = new UpdateCar();
// }
private void jbInit() throws Exception {
db = new DataBaseManager();
this.getContentPane().setLayout(xYLayout1);
jPanel1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jPanel1.setBorder(border1);
jPanel1.setLayout(xYLayout2);
jLabel1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton1.setText("查找");
jButton1.addActionListener(new UpdateCar_jButton1_actionAdapter(this));
xYLayout1.setWidth(584);
xYLayout1.setHeight(558);
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(" 发动机号:");
countid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
countid_t.setForeground(Color.black);
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(" 营审日期:");
lightid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
lightid_t.setForeground(Color.black);
drivername_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
drivername_t.setForeground(Color.black);
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(" 车牌号:");
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(" 制造商:");
jLabel7.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel7.setForeground(Color.black);
jLabel7.setBorder(BorderFactory.createEtchedBorder());
jLabel7.setText(" 次营审日期:");
startid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
startid_t.setForeground(Color.black);
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(" 底盘编号:");
jLabel9.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel9.setForeground(Color.black);
jLabel9.setBorder(BorderFactory.createEtchedBorder());
jLabel9.setText(" 年审日期:");
protecthour_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
protecthour_t.setForeground(Color.black);
carid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
carid_t.setForeground(Color.black);
carid_t.setText("");
jLabel10.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel10.setForeground(Color.black);
jLabel10.setBorder(BorderFactory.createEtchedBorder());
jLabel10.setPreferredSize(new Dimension(96, 24));
jLabel10.setText(" 顶灯号:");
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(" 违章次数:");
jLabel12.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel12.setForeground(Color.black);
jLabel12.setBorder(BorderFactory.createEtchedBorder());
jLabel12.setText(" 投保日期:");
breaklowcount_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
breaklowcount_t.setForeground(Color.black);
breaklowcount_t.setText("");
jLabel13.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel13.setForeground(Color.black);
jLabel13.setBorder(BorderFactory.createEtchedBorder());
jLabel13.setPreferredSize(new Dimension(96, 24));
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(" 投保时长:");
factory_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
factory_t.setForeground(Color.black);
jComboBox1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jComboBox1.setForeground(Color.black);
jLabel16.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel16.setForeground(Color.black);
jLabel16.setBorder(BorderFactory.createEtchedBorder());
jLabel16.setPreferredSize(new Dimension(96, 24));
jLabel16.setText(" 营运证号:");
jComboBox2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jComboBox2.setForeground(Color.black);
jComboBox1.addItem(" 汽 油");
jComboBox1.addItem(" 柴 油");
jComboBox2.addItem(" 待 命");
jComboBox2.addItem(" 工 作 中");
jComboBox2.addItem(" 修 理 中");
underid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
underid_t.setForeground(Color.black);
underid_t.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(" 下次年审:");
businessid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
businessid_t.setForeground(Color.black);
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(" 燃油类型:");
jButton2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton2.setToolTipText("保存修改");
jButton2.addActionListener(new UpdateCar_jButton2_actionAdapter(this));
jButton3.setBackground(Color.white);
jButton3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton3.setToolTipText("返 回");
jButton3.addActionListener(new UpdateCar_jButton3_actionAdapter(this));
jButton4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton4.setToolTipText("删除该记录");
jButton4.addActionListener(new UpdateCar_jButton4_actionAdapter(this));
driveid_t.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
driveid_t.setText("");
yingdate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
yingdate.setText("");
yeardate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
yeardate.setText("");
toudate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
toudate.setText("");
nextyingdate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
nextyingdate.setText("");
nextyeardate.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
nextyeardate.setText("");
this.setTitle("沈阳志远出租汽车公司出租车信息管理系统--车辆信息管理窗口");
findcarid_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent focusEvent) {
findcarid_t_focusLost(focusEvent);
}
});
findcarid_t.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
findcarid_t_keyPressed(e);
}
});
jPanel1.add(findcarid_t, new XYConstraints(157, 4, 125, 31));
jPanel1.add(jLabel1, new XYConstraints(43, 6, 104, 30));
this.getContentPane().add(jPanel1, new XYConstraints(22, 25, 545, 42));
this.getContentPane().add(jLabel2, new XYConstraints(45, 127, -1, 31));
this.getContentPane().add(drivername_t,
new XYConstraints(142, 248, 110, 30));
this.getContentPane().add(countid_t,
new XYConstraints(142, 207, 110, 30));
this.getContentPane().add(jComboBox1,
new XYConstraints(142, 167, 110, 30));
this.getContentPane().add(startid_t,
new XYConstraints(142, 127, 110, 30));
this.getContentPane().add(carid_t, new XYConstraints(142, 87, 110, 31));
this.getContentPane().add(jLabel5, new XYConstraints(45, 87, -1, 31));
this.getContentPane().add(jLabel19, new XYConstraints(45, 167, -1, 31));
this.getContentPane().add(jLabel3, new XYConstraints(45, 207, -1, 31));
this.getContentPane().add(jLabel14, new XYConstraints(47, 413, 96, 31));
this.getContentPane().add(jLabel12, new XYConstraints(46, 371, 96, 31));
this.getContentPane().add(jLabel18, new XYConstraints(45, 248, -1, 31));
this.getContentPane().add(jLabel9, new XYConstraints(45, 329, 96, 31));
this.getContentPane().add(jLabel4, new XYConstraints(45, 289, -1, 31));
this.getContentPane().add(toudate, new XYConstraints(144, 371, 108, 31));
this.getContentPane().add(yingdate, new XYConstraints(142, 289, 110, 31));
this.getContentPane().add(yeardate, new XYConstraints(142, 329, 110, 31));
this.getContentPane().add(jLabel8, new XYConstraints(335, 127, -1, 31));
this.getContentPane().add(jLabel13, new XYConstraints(335, 248, -1, 31));
this.getContentPane().add(jLabel10, new XYConstraints(335, 207, -1, 31));
this.getContentPane().add(lightid_t,
new XYConstraints(432, 207, 110, 30));
this.getContentPane().add(businessid_t,
new XYConstraints(432, 167, 110, 30));
this.getContentPane().add(jLabel16, new XYConstraints(335, 167, -1, 31));
this.getContentPane().add(underid_t,
new XYConstraints(432, 127, 110, 30));
this.getContentPane().add(jLabel6, new XYConstraints(336, 87, 95, 31));
this.getContentPane().add(factory_t, new XYConstraints(432, 87, 110, 30));
this.getContentPane().add(breaklowcount_t,
new XYConstraints(432, 413, 110, 30));
this.getContentPane().add(jLabel11, new XYConstraints(335, 413, -1, 31));
this.getContentPane().add(protecthour_t,
new XYConstraints(432, 371, 110, 30));
this.getContentPane().add(jLabel15, new XYConstraints(335, 371, -1, 31));
this.getContentPane().add(jLabel17, new XYConstraints(335, 329, -1, 31));
this.getContentPane().add(jLabel7, new XYConstraints(335, 289, -1, 31));
this.getContentPane().add(driveid_t,
new XYConstraints(433, 248, 109, 30));
this.getContentPane().add(nextyingdate,
new XYConstraints(432, 289, 110, 30));
this.getContentPane().add(nextyeardate,
new XYConstraints(432, 329, 110, 30));
this.getContentPane().add(jComboBox2,
new XYConstraints(144, 413, 108, 30));
jPanel1.add(jButton1, new XYConstraints(401, 1, 115, 33));
this.getContentPane().add(jButton4, new XYConstraints(411, 473, 101, 49));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -