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

📄 jinhuodan_iframe.java

📁 java 从入门到精通 清华大学出版社 适合初学者调试使用
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package com.lzw.iframe;

import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeListener;
import java.sql.*;
import java.util.*;
import java.util.Date;
import java.util.List;

import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.table.*;

import com.lzw.*;
import com.lzw.dao.Dao;
import com.lzw.dao.model.*;

public class JinHuoDan_IFrame extends JInternalFrame {

	private JPanel jContentPane = null;

	private JPanel topPanel = null;

	private JLabel idLabel = null;

	private JTextField idField = null;

	private JLabel gysLabel = null;

	private JLabel lxrLabel = null;

	private JTextField lxrField = null;

	private JLabel jsfsLabel = null;

	private JComboBox jsfsComboBox = null;

	private JLabel thsjLabel = null;

	private JTextField jhsjField = null;

	private JLabel jsrLabel = null;

	private JTextField czyField = null;

	private JPanel bottomPanel = null;

	private JLabel pzslLabel = null;

	private JTextField pzslField = null;

	private JLabel hpzsLabel = null;

	private JTextField hpzsField = null;

	private JLabel hjjeLabel = null;

	private JTextField hjjeField = null;

	private JLabel ysjlLabel = null;

	private JTextField ysjlField = null;

	private JLabel czyLabel = null;

	private JButton tjButton = null;

	private JButton rukuButton = null;

	private JScrollPane tablePane = null;

	private JTable table = null;

	private JComboBox spComboBox = null; // @jve:decl-index=0:visual-constraint="633,84"

	private JComboBox gysComboBox = null;

	private JComboBox jsrComboBox = null;

	private Date jhsjDate = new Date();

	/**
	 * 默认的构造方法
	 */
	public JinHuoDan_IFrame() {
		super();
		initialize();
	}

	/**
	 * 初始化界面的方法
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(600, 320);
		this.setIconifiable(true);
		this.setResizable(true);
		this.setMaximizable(true);
		this.setTitle("进货单");
		this.setClosable(true);
		this.setContentPane(getJContentPane());
	}

	/**
	 * 初始化jContentPane内容面板的方法
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jContentPane = new JPanel();
			jContentPane.setLayout(new BorderLayout());
			jContentPane.add(getTopPanel(), java.awt.BorderLayout.NORTH);
			jContentPane.add(getBottomPanel(), java.awt.BorderLayout.SOUTH);
			jContentPane.add(getTablePane(), java.awt.BorderLayout.CENTER);
		}
		return jContentPane;
	}

	/**
	 * 初始化topPanel面板的方法
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getTopPanel() {
		if (topPanel == null) {
			GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
			gridBagConstraints21.fill = GridBagConstraints.BOTH;
			gridBagConstraints21.gridy = 1;
			gridBagConstraints21.weightx = 1.0;
			gridBagConstraints21.gridx = 9;
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
			gridBagConstraints.fill = GridBagConstraints.BOTH;
			gridBagConstraints.gridy = 0;
			gridBagConstraints.weightx = 1.0;
			gridBagConstraints.gridx = 5;
			GridBagConstraints gridBagConstraints101 = new GridBagConstraints();
			gridBagConstraints101.gridx = 8;
			gridBagConstraints101.gridy = 1;
			jsrLabel = new JLabel();
			jsrLabel.setText("\u7ecf\u624b\u4eba\uff1a");
			GridBagConstraints gridBagConstraints91 = new GridBagConstraints();
			gridBagConstraints91.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints91.gridy = 1;
			gridBagConstraints91.weightx = 1.0;
			gridBagConstraints91.gridx = 5;
			GridBagConstraints gridBagConstraints81 = new GridBagConstraints();
			gridBagConstraints81.gridx = 4;
			gridBagConstraints81.gridy = 1;
			thsjLabel = new JLabel();
			thsjLabel.setText("进货时间:");
			GridBagConstraints gridBagConstraints71 = new GridBagConstraints();
			gridBagConstraints71.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints71.gridy = 1;
			gridBagConstraints71.weightx = 1.0;
			gridBagConstraints71.gridx = 1;
			GridBagConstraints gridBagConstraints61 = new GridBagConstraints();
			gridBagConstraints61.gridx = 0;
			gridBagConstraints61.gridy = 1;
			jsfsLabel = new JLabel();
			jsfsLabel.setText("\u7ed3\u7b97\u65b9\u5f0f\uff1a");
			GridBagConstraints gridBagConstraints51 = new GridBagConstraints();
			gridBagConstraints51.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints51.gridy = 0;
			gridBagConstraints51.weightx = 1.0;
			gridBagConstraints51.gridx = 9;
			GridBagConstraints gridBagConstraints41 = new GridBagConstraints();
			gridBagConstraints41.fill = GridBagConstraints.NONE;
			gridBagConstraints41.gridy = 0;
			gridBagConstraints41.gridx = 8;
			lxrLabel = new JLabel();
			lxrLabel.setText("\u8054\u7cfb\u4eba\uff1a");
			GridBagConstraints gridBagConstraints25 = new GridBagConstraints();
			gridBagConstraints25.gridx = 4;
			gridBagConstraints25.gridy = 0;
			gysLabel = new JLabel();
			gysLabel.setText("\u4f9b\u5e94\u5546\uff1a");
			GridBagConstraints gridBagConstraints110 = new GridBagConstraints();
			gridBagConstraints110.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints110.gridx = 1;
			gridBagConstraints110.gridy = 0;
			gridBagConstraints110.weightx = 1.0;
			gridBagConstraints110.insets = new Insets(0, 0, 0, 1);
			GridBagConstraints gridBagConstraints24 = new GridBagConstraints();
			gridBagConstraints24.gridx = 0;
			gridBagConstraints24.gridy = 0;
			idLabel = new JLabel();
			idLabel.setText("进货票号:");
			topPanel = new JPanel();
			topPanel.setLayout(new GridBagLayout());
			topPanel.add(idLabel, gridBagConstraints24);
			topPanel.add(getIdField(), gridBagConstraints110);
			topPanel.add(gysLabel, gridBagConstraints25);
			topPanel.add(getGysComboBox(), gridBagConstraints);
			topPanel.add(lxrLabel, gridBagConstraints41);
			topPanel.add(getLxrField(), gridBagConstraints51);
			topPanel.add(jsfsLabel, gridBagConstraints61);
			topPanel.add(getJsfsComboBox(), gridBagConstraints71);
			topPanel.add(thsjLabel, gridBagConstraints81);
			topPanel.add(getJhsjField(), gridBagConstraints91);
			topPanel.add(jsrLabel, gridBagConstraints101);
			topPanel.add(getJsrComboBox(), gridBagConstraints21);
		}
		return topPanel;
	}

	/**
	 * 初始化(进货票号)文本框的方法
	 * 
	 * @return javax.swing.JTextField
	 */
	private JTextField getIdField() {
		if (idField == null) {
			idField = new JTextField();
			idField.setEditable(false);
		}
		return idField;
	}

	/**
	 * 初始化(联系人)文本框的方法
	 * 
	 * @return javax.swing.JTextField
	 */
	private JTextField getLxrField() {
		if (lxrField == null) {
			lxrField = new JTextField();
		}
		return lxrField;
	}

	/**
	 * 初始化(计算方式)文本框的方法
	 * 
	 * @return javax.swing.JComboBox
	 */
	private JComboBox getJsfsComboBox() {
		if (jsfsComboBox == null) {
			jsfsComboBox = new JComboBox();
			jsfsComboBox.addItem("现金结款");
			jsfsComboBox.addItem("支票结款");
		}
		return jsfsComboBox;
	}

	/**
	 * 初始化(进货时间)文本框的方法
	 * 
	 * @return javax.swing.JTextField
	 */
	private JTextField getJhsjField() {
		if (jhsjField == null) {
			jhsjField = new JTextField();
		}
		return jhsjField;
	}

	/**
	 * 初始化操作员文本框的方法
	 * 
	 * @return javax.swing.JTextField
	 */
	private JTextField getCzyField() {
		if (czyField == null) {
			czyField = new JTextField();
			czyField.setEditable(false);
			czyField.setText(MainFrame.getCzyStateLabel().getText());
		}
		return czyField;
	}

	/**
	 * 初始化bottomPanel面板的方法
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getBottomPanel() {
		if (bottomPanel == null) {
			GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
			gridBagConstraints2.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints2.gridy = 1;
			gridBagConstraints2.weightx = 1.0;
			gridBagConstraints2.gridx = 3;
			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
			gridBagConstraints1.fill = GridBagConstraints.BOTH;
			gridBagConstraints1.gridy = 1;
			gridBagConstraints1.weightx = 1.0;
			gridBagConstraints1.gridx = 9;
			GridBagConstraints gridBagConstraints231 = new GridBagConstraints();
			gridBagConstraints231.fill = GridBagConstraints.NONE;
			gridBagConstraints231.gridy = 1;
			gridBagConstraints231.weightx = 0.3;
			gridBagConstraints231.gridx = 6;
			GridBagConstraints gridBagConstraints221 = new GridBagConstraints();
			gridBagConstraints221.gridx = 5;
			gridBagConstraints221.weightx = 0.3;
			gridBagConstraints221.gridy = 1;
			GridBagConstraints gridBagConstraints201 = new GridBagConstraints();
			gridBagConstraints201.gridx = 2;
			gridBagConstraints201.gridy = 1;
			czyLabel = new JLabel();
			czyLabel.setText("\u64cd\u4f5c\u5458\uff1a");
			GridBagConstraints gridBagConstraints191 = new GridBagConstraints();
			gridBagConstraints191.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints191.gridy = 1;
			gridBagConstraints191.weightx = 1.0;
			gridBagConstraints191.gridx = 1;
			GridBagConstraints gridBagConstraints181 = new GridBagConstraints();
			gridBagConstraints181.gridx = 0;
			gridBagConstraints181.gridy = 1;
			ysjlLabel = new JLabel();
			ysjlLabel.setText("\u9a8c\u6536\u7ed3\u8bba\uff1a");
			GridBagConstraints gridBagConstraints171 = new GridBagConstraints();
			gridBagConstraints171.anchor = GridBagConstraints.WEST;
			gridBagConstraints171.gridwidth = 2;
			gridBagConstraints171.gridx = 5;
			gridBagConstraints171.gridy = 0;
			gridBagConstraints171.weightx = 0.6;
			gridBagConstraints171.fill = GridBagConstraints.HORIZONTAL;
			GridBagConstraints gridBagConstraints161 = new GridBagConstraints();
			gridBagConstraints161.gridx = 4;
			gridBagConstraints161.gridy = 0;
			hjjeLabel = new JLabel();
			hjjeLabel.setText("\u5408\u8ba1\u91d1\u989d\uff1a");
			GridBagConstraints gridBagConstraints151 = new GridBagConstraints();
			gridBagConstraints151.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints151.gridy = 0;
			gridBagConstraints151.weightx = 1.0;
			gridBagConstraints151.gridx = 3;
			GridBagConstraints gridBagConstraints141 = new GridBagConstraints();
			gridBagConstraints141.gridx = 2;
			gridBagConstraints141.gridy = 0;
			hpzsLabel = new JLabel();
			hpzsLabel.setText("\u8d27\u54c1\u603b\u6570\uff1a");
			GridBagConstraints gridBagConstraints131 = new GridBagConstraints();
			gridBagConstraints131.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints131.gridy = 0;
			gridBagConstraints131.weightx = 1.0;
			gridBagConstraints131.gridx = 1;
			GridBagConstraints gridBagConstraints121 = new GridBagConstraints();
			gridBagConstraints121.anchor = GridBagConstraints.WEST;
			gridBagConstraints121.gridy = 0;
			gridBagConstraints121.gridx = 0;
			pzslLabel = new JLabel();
			pzslLabel.setText("\u54c1\u79cd\u6570\u91cf\uff1a");
			bottomPanel = new JPanel();
			bottomPanel.setLayout(new GridBagLayout());
			bottomPanel.add(pzslLabel, gridBagConstraints121);
			bottomPanel.add(getPzslField(), gridBagConstraints131);
			bottomPanel.add(hpzsLabel, gridBagConstraints141);
			bottomPanel.add(getHpzsField(), gridBagConstraints151);
			bottomPanel.add(hjjeLabel, gridBagConstraints161);
			bottomPanel.add(getHjjeField(), gridBagConstraints171);
			bottomPanel.add(ysjlLabel, gridBagConstraints181);
			bottomPanel.add(getYsjlField(), gridBagConstraints191);
			bottomPanel.add(czyLabel, gridBagConstraints201);
			bottomPanel.add(getCzyField(), gridBagConstraints2);
			bottomPanel.add(getTjButton(), gridBagConstraints221);
			bottomPanel.add(getRukuButton(), gridBagConstraints231);
		}
		return bottomPanel;
	}

	/**
	 * 初始化(品种数量)文本框的方法
	 * 

⌨️ 快捷键说明

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