📄 createcarddialog.java~39~
字号:
package parkingsystem;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.sql.*;
import javax.swing.border.*;
import java.awt.event.*;
import java.text.*;
import java.util.*;
import com.borland.dx.sql.dataset.*;
public class CreateCardDialog extends JDialog {
JPanel panel1 = new JPanel();
BorderLayout borderLayout2 = new BorderLayout();
XYLayout xYLayout1 = new XYLayout();
JPanel jPanel1 = new JPanel();
JPanel jPanel2 = new JPanel();
XYLayout xYLayout2 = new XYLayout();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JButton jButton2 = new JButton();
JTextField jTextField1 = new JTextField();
JTextField jTextField2 = new JTextField();
JPasswordField jPasswordField1 = new JPasswordField();
ButtonGroup buttonGroup1 = new ButtonGroup();
JComboBox jComboBox1 = new JComboBox();
JLabel jLabel7 = new JLabel();
XYLayout xYLayout3 = new XYLayout();
JLabel jLabel8 = new JLabel();
JButton jButton3 = new JButton();
JPasswordField jPasswordField2 = new JPasswordField();
JRadioButton jRadioButton3 = new JRadioButton();
JLabel jLabel9 = new JLabel();
JLabel jLabel10 = new JLabel();
JLabel jLabel11 = new JLabel();
JRadioButton jRadioButton4 = new JRadioButton();
JPanel jPanel3 = new JPanel();
JLabel jLabel12 = new JLabel();
JButton jButton4 = new JButton();
JPasswordField jPasswordField3 = new JPasswordField();
JRadioButton jRadioButton5 = new JRadioButton();
JLabel jLabel13 = new JLabel();
JLabel jLabel14 = new JLabel();
JLabel jLabel15 = new JLabel();
JRadioButton jRadioButton6 = new JRadioButton();
JPanel jPanel4 = new JPanel();
JLabel jLabel16 = new JLabel();
JLabel jLabel17 = new JLabel();
JLabel jLabel18 = new JLabel();
JTextField jTextField5 = new JTextField();
JTextField jTextField3 = new JTextField();
JButton jButton1 = new JButton();
JTextField jTextField4 = new JTextField();
QueryDataSet queryDataSet1,queryDataSet2;
Database database;
JRadioButton jRadioButton1 = new JRadioButton();
JLabel jLabel4 = new JLabel();
JRadioButton jRadioButton2 = new JRadioButton();
QueryDataSet queryDataSet3 = new QueryDataSet();
Database database1 = new Database();
public CreateCardDialog(Frame frame, String title, boolean modal,QueryDataSet queryDataSet1,QueryDataSet queryDataSet2,Database database) {
super(frame, title, modal);
this.queryDataSet1=queryDataSet1;
this.queryDataSet2=queryDataSet2;
this.database=database;
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
private void jbInit() throws Exception {
panel1.setLayout(xYLayout1);
this.getContentPane().setLayout(borderLayout2);
jPanel1.setBorder(BorderFactory.createEtchedBorder());
jPanel2.setBorder(BorderFactory.createEtchedBorder());
TitledBorder cardBorder=new TitledBorder("填入卡的相关信息");
TitledBorder owerBorder=new TitledBorder("添加车主信息");
jPanel1.setBorder(cardBorder);
jPanel1.setLayout(xYLayout2);
jPanel2.setBorder(owerBorder);
jPanel2.setLayout(xYLayout3);
jLabel1.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel1.setText("卡 号:");
jLabel2.setText("密 码:");
jLabel2.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel3.setText("车牌号:");
jLabel3.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel5.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel5.setText("申请时长(月):");
jLabel6.setText("应收款:");
jLabel6.setFont(new java.awt.Font("Dialog", 0, 12));
jButton2.setText("清 空");
jButton2.addActionListener(new CreateCardDialog_jButton2_actionAdapter(this));
jButton2.setFont(new java.awt.Font("Dialog", 0, 12));
jTextField1.setFont(new java.awt.Font("Dialog", 0, 12));
jTextField1.setText("");
jTextField2.setFont(new java.awt.Font("Dialog", 0, 12));
jTextField2.setText("");
jPasswordField1.setVerifyInputWhenFocusTarget(true);
jPasswordField1.setText("");
jComboBox1.setFont(new java.awt.Font("Dialog", 0, 12));
jComboBox1.addActionListener(new CreateCardDialog_jComboBox1_actionAdapter(this));
jLabel7.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel7.setText("");
jLabel8.setText("卡类型:");
jLabel8.setFont(new java.awt.Font("Dialog", 0, 12));
jButton3.setFont(new java.awt.Font("Dialog", 0, 12));
jButton3.setText("清 空");
jPasswordField2.setText("");
jPasswordField2.setVerifyInputWhenFocusTarget(true);
jRadioButton3.setText("长期卡");
jRadioButton3.setSelected(true);
jRadioButton3.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel9.setText("卡 号:");
jLabel9.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel10.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel10.setText("车牌号:");
jLabel11.setText("");
jLabel11.setFont(new java.awt.Font("Dialog", 0, 12));
jRadioButton4.setFont(new java.awt.Font("Dialog", 0, 12));
jRadioButton4.setText("次卡");
jPanel3.setBorder(BorderFactory.createEtchedBorder());
jLabel12.setText("卡类型:");
jLabel12.setFont(new java.awt.Font("Dialog", 0, 12));
jButton4.setFont(new java.awt.Font("Dialog", 0, 12));
jButton4.setText("清 空");
jPasswordField3.setText("");
jPasswordField3.setVerifyInputWhenFocusTarget(true);
jRadioButton5.setText("长期卡");
jRadioButton5.setSelected(true);
jRadioButton5.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel13.setText("卡 号:");
jLabel13.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel14.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel14.setText("车牌号:");
jLabel15.setText("");
jLabel15.setFont(new java.awt.Font("Dialog", 0, 12));
jRadioButton6.setFont(new java.awt.Font("Dialog", 0, 12));
jRadioButton6.setText("次卡");
jPanel4.setBorder(BorderFactory.createEtchedBorder());
jLabel16.setText("车主姓名:");
jLabel16.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel17.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel17.setText("住 址:");
jLabel18.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel18.setText("联系电话:");
jTextField5.setText("");
jTextField5.setFont(new java.awt.Font("Dialog", 0, 12));
jTextField3.setText("");
jTextField3.setFont(new java.awt.Font("Dialog", 0, 12));
jButton1.setText("确 定");
jButton1.addActionListener(new CreateCardDialog_jButton1_actionAdapter(this));
jButton1.setFont(new java.awt.Font("Dialog", 0, 12));
jTextField4.setFont(new java.awt.Font("Dialog", 0, 12));
jTextField4.setText("");
jRadioButton1.setFont(new java.awt.Font("Dialog", 0, 12));
jRadioButton1.setSelected(true);
jRadioButton1.setText("长期卡");
jRadioButton1.addActionListener(new CreateCardDialog_jRadioButton1_actionAdapter(this));
jLabel4.setFont(new java.awt.Font("Dialog", 0, 12));
jLabel4.setText("选择新开卡类型:");
jRadioButton2.setFont(new java.awt.Font("Dialog", 0, 12));
jRadioButton2.setText("次卡");
jRadioButton2.addActionListener(new CreateCardDialog_jRadioButton2_actionAdapter(this));
panel1.setFont(new java.awt.Font("Dialog", 0, 12));
panel1.setPreferredSize(new Dimension(400, 430));
database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=carparkingdb", "sa", "", false, "com.microsoft.jdbc.sqlserver.SQLServerDriver"));
queryDataSet3.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "select Price from cardtype where CardType=\'长期卡\'", null, true, Load.ALL));
getContentPane().add(panel1, BorderLayout.CENTER);
jPanel2.add(jLabel18, new XYConstraints(49, 40, 61, 28));
jPanel2.add(jLabel16, new XYConstraints(49, 2, 61, 28));
jPanel2.add(jTextField3, new XYConstraints(116, 5, 193, -1));
jPanel2.add(jTextField4, new XYConstraints(115, 42, 193, -1));
jPanel2.add(jLabel17, new XYConstraints(49, 78, 61, 28));
jPanel2.add(jTextField5, new XYConstraints(116, 80, 193, -1));
panel1.add(jPanel1, new XYConstraints(16, 53, 388, 165));
jPanel1.add(jLabel2, new XYConstraints(49, 32, 61, 28));
jPanel1.add(jPasswordField1, new XYConstraints(116, 36, 193, 23));
jPanel1.add(jLabel1, new XYConstraints(49, 1, 61, 28));
jPanel1.add(jTextField1, new XYConstraints(116, 5, 193, -1));
jPanel1.add(jLabel3, new XYConstraints(49, 62, 61, 28));
jPanel1.add(jTextField2, new XYConstraints(116, 66, 193, -1));
jPanel1.add(jLabel5, new XYConstraints(49, 103, 83, 28));
jPanel1.add(jComboBox1, new XYConstraints(139, 108, 79, 20));
jPanel1.add(jLabel6, new XYConstraints(232, 104, 61, 28));
jPanel1.add(jLabel7, new XYConstraints(279, 107, 93, 27));
panel1.add(jRadioButton1, new XYConstraints(144, 16, 76, 30));
panel1.add(jLabel4, new XYConstraints(24, 16, 108, 30));
panel1.add(jRadioButton2, new XYConstraints(246, 16, 102, 30));
panel1.add(jButton1, new XYConstraints(102, 368, 83, 30));
panel1.add(jButton2, new XYConstraints(239, 368, 83, 30));
panel1.add(jPanel2, new XYConstraints(16, 215, 388, 144));
buttonGroup1.add(jRadioButton1);
buttonGroup1.add(jRadioButton2);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -