日期:2014-05-20 浏览次数:20697 次
package zzk.zhuoyue.jbxxframe;
import zzk.zhuoyue.dao.SaveConn;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.awt.BorderLayout;
···
public class GysInfoFrame extends JFrame
{
/**
* @param args
*/
private JTabbedPane tabbedPane;
//private JPanel contentPane;
private JPanel addPanel;
private JPanel modifyPanel;
private JPanel delPanel;
private JComboBox modifyComboBox;
private JComboBox delComboBox;
private JButton btn_fanhui;
private JButton btn_baocun;
private JButton btn_chongshu;
private JButton btn_xiugai;
private JButton m_btn_fanhui;
private JButton m_btn_xiugai;
private JTextField m_txf_gysqc;
private JTextField m_txf_jiancheng;
private JTextField m_txf_youbian;
private JTextField m_txf_dianhua;
···
private JTextField txf_gysqc;
private JTextField txf_jiancheng;
private JTextField txf_youbian;
private JTextField txf_dianhua;
···
private String gysid = null;
private Connection conn;
private Statement state;
private ResultSet res;
public static void main(String[] args)
{
// TODO Auto-generated method stub
GysInfoFrame frame = new GysInfoFrame();
frame.setVisible(true);
}
public GysInfoFrame()
{
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 659, 433);
//setSize(630,440);
/*************** 三个面板的初始化 ***************/
tabbedPane = new JTabbedPane();
addPanel = new JPanel();
modifyPanel = new JPanel();
delPanel = new JPanel();
addPanel.setLayout(null);
modifyPanel.setLayout(null);
delPanel.setLayout(null);
getContentPane().add(tabbedPane, BorderLayout.CENTER);
tabbedPane.add("添加供应商信息", addPanel);
tabbedPane.add("修改供应商信息", modifyPanel);
tabbedPane.add("删除供应商信息", delPanel);
/******************* addPanel 添加供应商信息面板初始化 ********************/
qcLabel = new JLabel("供应商全称:");
qcLabel.setBounds(78, 31, 72, 15);
addPanel.add(qcLabel);
txf_gysqc = new JTextField();
txf_gysqc.setBounds(187, 28, 364, 21);
addPanel.add(txf_gysqc);
txf_gysqc.setColumns(10);
jcLabel = new JLabel("简 称:");
jcLabel.setBounds(78, 78, 54, 15);
addPanel.add(jcLabel);
txf_jiancheng = new JTextField();
txf_jiancheng.setBounds(187, 75, 133, 21);
addPanel.add(txf_jiancheng);
txf_jiancheng.setColumns(10);
ybLabel = new JLabel("邮 编:");
ybLabel.setBounds(354, 78, 54, 15);
addPanel.add(ybLabel);
txf_youbian = new JTextField();
txf_youbian.setBounds(418, 75, 133, 21);
addPanel.add(txf_youbian);
txf_youbian.setColumns(10);
dhLabel = new JLabel("电 话:");
dhLabel.setBounds(78, 172, 54, 15);
addPanel.add(dhLabel);
txf_dianhua = new JTextField();
txf_dianhua.setBounds(187, 169, 133, 21);
addPanel.add(txf_dianhua);
txf_dianhua.setColumns(10);
czLabel = new JLabel("传 真:");
czLabel.setBounds(354, 172, 54, 15);
addPanel.add(czLabel);
txf_chuanzhen = new JTextField();
txf_chuanzhen.setBounds(436, 169, 115, 21);
addPanel.add(txf_chuanzhen);
txf_chuanzhen.setColumns(10);
dizhiLabel = new JLabel("地 址:");
dizhiLabel.setBounds(78, 127, 54, 15);
addPanel.add(dizhiLabel);
txf_dizhi = new JTextField();
txf_dizhi.setBounds(187, 124, 364, 21);
addPanel.add(txf_dizhi);
txf_dizhi.setColumns(10);
lxrLabel = new JLabel("联系人:");
lxrLabel.setBounds(78, 214, 54, 15);
addPanel.add(lxrLabel);
txf_lianxiren = new JTextField();
txf_lianxiren.setBounds(187, 211, 133, 21);
addPanel.add(txf_lianxiren);
txf_lianxiren.setColumns(10);
lxrdhLabel = new JLabel("联系电话:");
lxrdhLabel.setBounds(354, 214, 72, 15);
addPanel.add(lxrdhLabel);
txf_lianxirendianhua = new JTextField();
txf_lianxirendianhua.setBounds(436, 211, 115, 21);
addPanel.add(txf_lianxirendianhua);
txf_lianxirendianhua.setColumns(10);
khLabel = new JLabel("开户银行:");
khLabel.setBounds(78, 255, 72, 15);