checkoutframe.java
来自「Athena酒店小组_Athena酒店管理系统」· Java 代码 · 共 328 行 · 第 1/2 页
JAVA
328 行
package frames;
import jimmie.*;
import module.*;
import java.util.*;
import helper.*;
import java.util.Date;
/*
* CheckOut.java
*
* Created on 2007年6月19日, 上午12:27
*/
/**
*
* @author Jimmie
*/
public class CheckOutFrame extends javax.swing.JInternalFrame {
/** Creates new form CheckOut */
public CheckOutFrame(ArrayList a) {
initComponents();
for(int i=0;i<a.size();i++){
TableHelper.addToTable(consumption, (Object[])a.get(i));
}
Date date=new Date(System.currentTimeMillis());
currenttime.setText(String.valueOf(date));
}
private void userInit()
{
StartConsumptionAccess sca = new StartConsumptionAccess(Resource.getDBResource());
ArrayList<StartConsumption> scs=sca.getAllStartConsumptions();
StartConsumption start=new StartConsumption();
account.setText(start.getAccount());
num.setText(start.getRoomNum());
housename.setText(start.getHouseName());
listnum.setText(start.getListNum());
// starttime.setText(String.valueOf(time.getText()));
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
account = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
num = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
housename = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
listnum = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
starttime = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
currenttime = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jLabel14 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel15 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jLabel16 = new javax.swing.JLabel();
jTextField3 = new javax.swing.JTextField();
jLabel17 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jLabel18 = new javax.swing.JLabel();
jTabbedPane1 = new javax.swing.JTabbedPane();
jScrollPane1 = new javax.swing.JScrollPane();
consumption = new javax.swing.JTable();
setClosable(true);
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setIconifiable(true);
setMaximizable(true);
setResizable(true);
setTitle("\u7ed3\u5e10\u4e70\u5355");
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("\u623f\u53f0\u4fe1\u606f"));
jLabel1.setText("\u987e\u5ba2\u8d26\u53f7\uff1a");
account.setForeground(new java.awt.Color(0, 51, 255));
account.setText("123456");
jLabel3.setFont(new java.awt.Font("新宋体", 0, 12));
jLabel3.setText("\u623f\u53f0\u53f7\uff1a");
num.setForeground(new java.awt.Color(255, 0, 51));
num.setText("01");
jLabel5.setText("\u623f\u53f0\u540d\u79f0\uff1a");
housename.setFont(new java.awt.Font("宋体", 0, 14));
housename.setForeground(new java.awt.Color(153, 0, 153));
housename.setText("\u5927\u538501");
jLabel7.setText("\u623f\u53f0\u5355\u53f7\uff1a");
listnum.setForeground(new java.awt.Color(0, 102, 255));
listnum.setText("001");
jLabel9.setText("\u5f00\u53f0\u65f6\u95f4\uff1a");
starttime.setForeground(new java.awt.Color(0, 51, 255));
starttime.setText("07-06-20 19\uff1a00");
jLabel11.setText("\u4e70\u5355\u65f6\u95f4\uff1a");
currenttime.setForeground(new java.awt.Color(0, 102, 255));
jLabel13.setText("\u5907\u6ce8\u4fe1\u606f\uff1a");
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(org.jdesktop.layout.GroupLayout.LEADING, jLabel9, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(jPanel1Layout.createSequentialGroup()
.add(account)
.add(32, 32, 32)
.add(jLabel3))
.add(jPanel1Layout.createSequentialGroup()
.add(10, 10, 10)
.add(starttime, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(num)
.add(35, 35, 35)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel11))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(housename, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 82, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel7)
.add(16, 16, 16)
.add(listnum))
.add(currenttime, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)))
.add(jLabel13))
.addContainerGap(48, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel1)
.add(account)
.add(jLabel3)
.add(num)
.add(jLabel5)
.add(housename)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?