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

📄 modifyrservation.java~5~

📁 这个一个餐厅预定系统,可实现查询目前餐厅预订情况,实现餐桌预订以及就餐时为顾客调节餐桌的情况.
💻 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 {

    private ReservationFrame resFrame;
    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("预定时间:");
        jLabel5.setText("预定日期:");
        jLabel4.setText("当前日期:");
        jLabel3.setText("人数:");
        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);
    }
}

⌨️ 快捷键说明

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