?? modifyrservation.java~5~
字號:
package bookingsystem;
import java.awt.*;
import javax.swing.*;
import java.awt.BorderLayout;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ModifyRservation extends JFrame {
XYLayout xYLayout1 = new XYLayout();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JTextField jTextField1 = new JTextField();
JTextField jTextField2 = new JTextField();
JTextField jTextField3 = new JTextField();
JTextField jTextField4 = new JTextField();
JTextField jTextField5 = new JTextField();
JTextField jTextField6 = new JTextField();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
public ModifyRservation( ReservationFrame resFrame) {
try {
this.resFrame = resFrame;
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(xYLayout1);
jLabel1.setText("顧客姓名");
jLabel6.setText("預(yù)定時間:");
jLabel5.setText("預(yù)定日期:");
jLabel4.setText("當前日期:");
jLabel3.setText("人數(shù):");
jButton1.setToolTipText("");
jButton1.setText("修改");
jButton2.setText("取消");
jButton2.addActionListener(new ModifyRservation_jButton2_actionAdapter(this));
xYLayout1.setWidth(384);
xYLayout1.setHeight(392);
this.getContentPane().add(jLabel1, new XYConstraints(65, 37, -1, -1));
this.getContentPane().add(jLabel2, new XYConstraints(65, 79, -1, -1));
this.getContentPane().add(jLabel3, new XYConstraints(65, 130, -1, -1));
this.getContentPane().add(jButton2, new XYConstraints(253, 321, 59, -1));
this.getContentPane().add(jTextField6,
new XYConstraints(159, 252, 130, 23));
this.getContentPane().add(jButton1, new XYConstraints(63, 321, -1, -1));
this.getContentPane().add(jTextField5,
new XYConstraints(161, 209, 128, 24));
this.getContentPane().add(jTextField4,
new XYConstraints(160, 166, 129, 22));
this.getContentPane().add(jLabel4, new XYConstraints(65, 170, -1, -1));
this.getContentPane().add(jLabel5, new XYConstraints(63, 212, -1, -1));
this.getContentPane().add(jLabel6, new XYConstraints(61, 254, -1, -1));
this.getContentPane().add(jTextField3,
new XYConstraints(159, 121, 130, -1));
this.getContentPane().add(jTextField2,
new XYConstraints(159, 77, 130, 22));
this.getContentPane().add(jTextField1,
new XYConstraints(158, 39, 131, -1));
jLabel2.setText("餐桌號:");
displaySelectedReservation();
}
public void displaySelectedReservation()
{
int i = this.resFrame.jdbTable1.getSelectedRow();
System.out.print(i);
}
public void jButton2_actionPerformed(ActionEvent e) {
this.dispose();
}
}
class ModifyRservation_jButton2_actionAdapter implements ActionListener {
private ModifyRservation adaptee;
ModifyRservation_jButton2_actionAdapter(ModifyRservation adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -