?? newbroke.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 com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.Font;
import java.awt.Color;
import javax.swing.border.Border;
import javax.swing.border.EtchedBorder;
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.HeadlessException;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
public class Newbroke extends JFrame {
public Newbroke() {
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
// public static void main(String[] args) {
// Newbroke newbroke = new Newbroke();
// }
private void jbInit() throws Exception {
jLabel1.setBorder(border1);
this.getContentPane().setLayout(xYLayout1);
jLabel1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel1.setText(" 維修車號:");
carid_t.setNextFocusableComponent(people_t);
carid_t.setText("");
carid_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
carid_t_focusLost(e);
}
});
jLabel2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel2.setBorder(border1);
jLabel2.setText(" 負責人:");
people_t.setNextFocusableComponent(updatedate_t);
people_t.setText("");
people_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
people_t_focusLost(e);
}
});
jLabel4.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel4.setBorder(BorderFactory.createEtchedBorder());
jLabel4.setText(" 維修時間:");
jLabel5.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel5.setBorder(BorderFactory.createEtchedBorder());
jLabel5.setText(" 修理廠:");
jLabel6.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel6.setBorder(BorderFactory.createEtchedBorder());
jLabel6.setText(" 維修金額:");
xYLayout1.setWidth(546);
xYLayout1.setHeight(536);
jLabel7.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel7.setBorder(BorderFactory.createEtchedBorder());
jLabel7.setText(" 維修時公里數(shù):");
jLabel8.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel8.setBorder(BorderFactory.createEtchedBorder());
jLabel8.setText(" 公里");
jLabel9.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel9.setBorder(BorderFactory.createEtchedBorder());
jLabel9.setText(" 所更換零配件:");
jLabel10.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel10.setBorder(BorderFactory.createEtchedBorder());
jLabel10.setText(" 維修原因:");
change_a.setBorder(border3);
change_a.setNextFocusableComponent(reason_a);
change_a.setText("");
change_a.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
change_a_focusLost(e);
}
});
reason_a.setBorder(border2);
reason_a.setNextFocusableComponent(jButton2);
reason_a.setText("");
reason_a.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
reason_a_keyPressed(e);
}
});
reason_a.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
reason_a_focusLost(e);
}
});
jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton1.setToolTipText("清 空");
jButton1.addActionListener(new Newbroke_jButton1_actionAdapter(this));
jButton2.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton2.setToolTipText("添 加");
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jButton2_actionPerformed(e);
}
});
jButton3.setBackground(Color.white);
jButton3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jButton3.addActionListener(new Newbroke_jButton3_actionAdapter(this));
jLabel11.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel11.setBorder(BorderFactory.createEtchedBorder());
jLabel11.setText(" 元");
updatedate_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
updatedate_t_focusLost(e);
}
});
factory_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
factory_t_focusLost(e);
}
});
updatetime_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
updatetime_t_focusLost(e);
}
});
money_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
money_t_focusLost(e);
}
});
kilometre_t.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
kilometre_t_focusLost(e);
}
});
this.setTitle("沈陽志遠出租汽車公司出租車信息管理系統(tǒng)--添加維修信息窗口");
updatedate_t.setNextFocusableComponent(factory_t);
factory_t.setNextFocusableComponent(updatetime_t);
updatetime_t.setNextFocusableComponent(money_t);
money_t.setNextFocusableComponent(kilometre_t);
kilometre_t.setNextFocusableComponent(change_a);
this.getContentPane().add(people_t,
new XYConstraints(383, 48, 102, 31));
jLabel3.setFont(new java.awt.Font("Dialog", Font.PLAIN, 14));
jLabel3.setBorder(BorderFactory.createEtchedBorder());
jLabel3.setText(" 維修日期:");
this.getContentPane().add(jLabel2, new XYConstraints(300, 48, 82, 31));
this.getContentPane().add(jLabel1, new XYConstraints(58, 48, -1, 32));
this.getContentPane().add(jLabel1, new XYConstraints(58, 48, -1, 32));
this.getContentPane().add(jLabel3, new XYConstraints(58, 91, -1, 31));
this.getContentPane().add(jLabel4, new XYConstraints(58, 135, -1, 31));
this.getContentPane().add(jLabel5, new XYConstraints(300, 90, 82, 31));
this.getContentPane().add(factory_t,
new XYConstraints(383, 90, 102, 31));
this.getContentPane().add(carid_t,
new XYConstraints(141, 48, 102, 31));
this.getContentPane().add(jLabel6, new XYConstraints(300, 135, 82, 31));
this.getContentPane().add(jLabel7, new XYConstraints(58, 181, -1, 31));
this.getContentPane().add(kilometre_t,
new XYConstraints(170, 181, 80, 30));
this.getContentPane().add(jLabel8, new XYConstraints(250, 181, 51, 30));
this.getContentPane().add(jLabel9, new XYConstraints(58, 229, 111, 31));
this.getContentPane().add(jLabel10, new XYConstraints(59, 330, 109, 31));
this.getContentPane().add(reason_a,
new XYConstraints(170, 330, 317, 84));
this.getContentPane().add(change_a,
new XYConstraints(171, 229, 316, 85));
this.getContentPane().add(money_t,
new XYConstraints(383, 135, 67, 31));
this.getContentPane().add(jLabel11, new XYConstraints(450, 135, 36, 31));
this.getContentPane().add(updatedate_t,
new XYConstraints(141, 91, 100, 30));
this.getContentPane().add(updatetime_t,
new XYConstraints(141, 136, 100, 30));
this.getContentPane().add(jButton2, new XYConstraints(94, 455, 87, 49));
this.getContentPane().add(jButton1, new XYConstraints(401, 455, 86, 49));
this.getContentPane().add(jButton3, new XYConstraints(248, 455, 91, 49));
this.setVisible(true);
this.setSize(546, 576);
this.setLocation(170, 50);
addWindowListener(new WindowAdapter() {
public void WindowClosing(WindowEvent e) {
if (db != null)
db.closeConnection();
dispose();
}
});
}
DataBaseManager db = null;
ResultSet r;
XYLayout xYLayout1 = new XYLayout();
JLabel jLabel1 = new JLabel();
Border border1 = BorderFactory.createEtchedBorder(Color.white,
new Color(165, 163, 151));
JTextField carid_t = new JTextField();
JLabel jLabel2 = new JLabel();
JTextField people_t = new JTextField();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
JTextField factory_t = new JTextField();
JTextField money_t = new JTextField();
JLabel jLabel6 = new JLabel();
JLabel jLabel7 = new JLabel();
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -