package com.scse.face;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.sql.ResultSet;
import java.text.ParseException;
import java.util.Date;
import java.util.Vector;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
import com.scse.db.Dbcon;
import com.scse.db.QueryAction;
import com.scse.model.TableModel;
@SuppressWarnings("serial")
public class SelectGood extends JInternalFrame {
private SelectGood selectGood = null;
private JPanel jContentPane = null;
private JPanel jPanel = null;
private JRadioButton jRadioButton = null;
private JPanel jPanel1 = null;
private JPanel jPanel2 = null;
private JPanel jPanel3 = null;
@SuppressWarnings("unused")
private ManageFrame manageFrame;
private JLabel jLabel = null;
private JRadioButton jRadioButton1 = null;
private JLabel jLabel1 = null;
private JRadioButton jRadioButton2 = null;
private JLabel jLabel2 = null;
private JLabel jLabel3 = null;
private JLabel jLabel4 = null;
private JComboBox jComboBox = null;
private JComboBox jComboBox1 = null;
private JButton jButton = null;
private JLabel jLabel6 = null;
private JLabel jLabel7 = null;
private JButton jButton1 = null;
private JScrollPane jScrollPane = null;
private JTable jTable = null;
private JTextField jTextField = null;
private JButton jButton2 = null;
private JTextField jTextField1 = null;
private JButton jButton3 = null;
private JLabel jLabel5 = null;
private JComboBox jComboBox2 = null;
/**
* This is the xxx default constructor
*/
public SelectGood(ManageFrame manageFrame) {
super();
this.manageFrame = manageFrame;
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(747, 495);
this.setClosable(true);
this.setLocation(new Point(143, 70));
this.setContentPane(getJContentPane());
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJPanel(), null);
jContentPane.add(getJPanel1(), null);
jContentPane.add(getJPanel2(), null);
jContentPane.add(getJPanel3(), null);
}
return jContentPane;
}
/**
* This method initializes jPanel
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel() {
if (jPanel == null) {
jLabel2 = new JLabel();
jLabel2.setBounds(new Rectangle(407, 21, 84, 26));
jLabel2.setText("售货信息查询");
jLabel1 = new JLabel();
jLabel1.setBounds(new Rectangle(230, 21, 84, 26));
jLabel1.setText("库存信息查询");
jLabel = new JLabel();
jLabel.setBounds(new Rectangle(63, 21, 84, 26));
jLabel.setText("进货信息查询");
jPanel = new JPanel();
jPanel.setLayout(null);
jPanel.setBounds(new Rectangle(16, 2, 534, 63));
jPanel.add(getJRadioButton(), null);
jPanel.setBorder(BorderFactory.createTitledBorder(null,
"\u8bf7\u9009\u62e9\u67e5\u8be2\u7c7b\u578b",
TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog",
Font.BOLD, 12), new Color(51, 51, 51)));
jPanel.add(jLabel, null);
jPanel.add(getJRadioButton1(), null);
jPanel.add(jLabel1, null);
jPanel.add(getJRadioButton2(), null);
jPanel.add(jLabel2, null);
}
return jPanel;
}
/**
* This method initializes jRadioButton
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton() {
if (jRadioButton == null) {
jRadioButton = new JRadioButton();
jRadioButton.setBounds(new Rectangle(36, 24, 21, 21));
jRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
QueryAction queryAction = new QueryAction();
ResultSet rs = queryAction.getIndex();
try{
while(rs.next()){
jComboBox.addItem(rs.getObject(1).toString().substring(0,2));
}
}catch(Exception er){
er.printStackTrace();
}
}
});
}
return jRadioButton;
}
/**
* This method initializes jPanel1
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel1() {
if (jPanel1 == null) {
jLabel5 = new JLabel();
jLabel5.setBounds(new Rectangle(18, 109, 71, 28));
jLabel5.setText("三级查询");
jLabel4 = new JLabel();
jLabel4.setBounds(new Rectangle(18, 68, 71, 28));
jLabel4.setText("二级查询");
jLabel3 = new JLabel();
jLabel3.setText("一级查询");
jLabel3.setBounds(new Rectangle(18, 30, 71, 28));
jPanel1 = new JPanel();
jPanel1.setLayout(null);
jPanel1.setBounds(new Rectangle(16, 77, 323, 155));
jPanel1.setBorder(BorderFactory.createTitledBorder(null,
"\u5546\u54c1\u4ee3\u53f7\u67e5\u8be2",
TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog",
Font.BOLD, 12), new Color(51, 51, 51)));
jPanel1.add(jLabel3, null);
jPanel1.add(jLabel4, null);
jPanel1.add(getJComboBox(), null);
jPanel1.add(getJComboBox1(), null);
jPanel1.add(getJButton(), null);
jPanel1.add(jLabel5, null);
jPanel1.add(getJComboBox2(), null);
}
return jPanel1;
}
/**
* This method initializes jPanel2
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel2() {
if (jPanel2 == null) {
jLabel7 = new JLabel();
jLabel7.setBounds(new Rectangle(20, 71, 73, 25));
jLabel7.setText("结束日期");
jLabel6 = new JLabel();
jLabel6.setText("开始日期");
jLabel6.setBounds(new Rectangle(20, 31, 73, 25));
jPanel2 = new JPanel();
jPanel2.setLayout(null);
jPanel2.setBounds(new Rectangle(460, 77, 246, 155));
jPanel2.setBorder(BorderFactory.createTitledBorder(null,
"\u5546\u54c1\u65e5\u671f\u67e5\u8be2",
TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog",
Font.BOLD, 12), new Color(51, 51, 51)));
jPanel2.add(jLabel6, null);
jPanel2.add(jLabel7, null);
jPanel2.add(getJButton1(), null);
jPanel2.add(getJTextField(), null);
jPanel2.add(getJButton2(), null);
jPanel2.add(getJTextField1(), null);
jPanel2.add(getJButton3(), null);
}
return jPanel2;
}
/**
* This method initializes jPanel3
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel3() {
if (jPanel3 == null) {
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(1);
jPanel3 = new JPanel();
jPanel3.setLayout(gridLayout);
jPanel3.setBounds(new Rectangle(16, 240, 691, 211));
jPanel3.setBorder(BorderFactory.createTitledBorder(null,
"\u67e5\u8be2\u7ed3\u679c",
TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog",
Font.BOLD, 12), new Color(51, 51, 51)));
jPanel3.add(getJScrollPane(), null);
}
return jPanel3;
}
/**
* This method initializes jRadioButton1
*
* @return javax.swing.JRadioButton
*/
private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setBounds(new Rectangle(197, 24, 21, 21));
jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
评论0