亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vipinputframe.java

?? 這是一個JAVA開發的商場VIP消費管理系統
?? JAVA
字號:
import java.sql.*; 
import javax.swing.*; 
//import javax.swing.event.*;
import java.awt.*; 
import java.awt.event.*; 
import java.util.*; 

public class VipInputFrame extends JDialog 
{
	private Connection Insertconnection; 
   	private Statement Insertstatement; 
   	//private Statement InsertInputstatement; 
   	private ResultSet InsertresultSet; 
   	private ResultSetMetaData rsMetaData;
   
    
    //GUI變量定義
	private JLabel VipSerialLabel ;
	private JLabel VipJoinTimeLabel ;
	private JLabel VipNameLabel ;
	private JLabel VipAgeLabel ;
	private JLabel VipPositionLabel ;
	
   	private JTextField VipSerialField;
   	private JTextField VipJoinTimeField;
   	private JTextField VipNameField;
   	private JTextField VipAgeField;
   	private JTextField VipPositionField;
	
	private JButton SubmmitButton ;
	private JButton cancelButton ;
	private JFrame parent; 
    
    public VipInputFrame(JFrame parent, boolean modal) 
    {
        super(parent, modal);
        this.parent = parent;
        pack();
        
        initComponents(); 
        
    }
    private void initComponents() 
    {
    	GridBagLayout layout = new GridBagLayout();
        Container contents = getContentPane();
        contents.setLayout(layout);

        GridBagConstraints constraints = new GridBagConstraints();

        setTitle ("VIP信息錄入窗口");
        addWindowListener(new WindowAdapter () 
        {
            public void windowClosing(WindowEvent event) 
            {
                setVisible(false);
        		dispose();
            }
        });
        
        VipSerialField = new JTextField(); // needed below
        VipSerialField.setPreferredSize(new Dimension(150, 25));
        VipSerialLabel = new JLabel();
        VipSerialLabel.setText("V  I  P   號:        ");
        VipSerialLabel.setLabelFor(VipSerialField);
        constraints.weightx = 100;
        constraints.weighty = 100;
        constraints.gridx = 0;
        constraints.gridy = 0;
        constraints.gridwidth = 1;
        constraints.gridheight = 1;
        contents.add(VipSerialLabel, constraints);
        constraints.gridx = 1;
        constraints.gridy = 0;
        constraints.gridwidth = 2;
        constraints.gridheight = 1;
        contents.add(VipSerialField, constraints);
        //2
        VipJoinTimeField = new JTextField(); // needed below
        VipJoinTimeField.setPreferredSize(new Dimension(150, 25));
        VipJoinTimeLabel = new JLabel();
        VipJoinTimeLabel.setText("入會時間:(####-##-##)");
        VipJoinTimeLabel.setLabelFor(VipJoinTimeField);
        constraints.gridx = 0;
        constraints.gridy = 1;
        constraints.gridwidth = 1;
        constraints.gridheight = 1;
        contents.add(VipJoinTimeLabel, constraints);
        constraints.gridx = 1;
        constraints.gridy = 1;
        constraints.gridwidth = 2;
        constraints.gridheight = 1;
        contents.add(VipJoinTimeField, constraints);
        //3
        VipNameField = new JTextField(); // needed below
        VipNameField.setPreferredSize(new Dimension(150, 25));
        VipNameLabel = new JLabel();
        VipNameLabel.setText("會 員 姓 名:        ");
        VipNameLabel.setLabelFor(VipNameField);
        constraints.gridx = 0;
        constraints.gridy = 2;
        constraints.gridwidth = 1;
        constraints.gridheight = 1;
        contents.add(VipNameLabel, constraints);
        constraints.gridx = 1;
        constraints.gridy = 2;
        constraints.gridwidth = 2;
        constraints.gridheight = 1;
        contents.add(VipNameField, constraints);
        //4
        VipAgeField = new JTextField(); // needed below
        VipAgeField.setPreferredSize(new Dimension(150, 25));
        VipAgeLabel = new JLabel();
        VipAgeLabel.setText("會 員 年 齡:        ");
        VipAgeLabel.setLabelFor(VipAgeField);
        constraints.gridx = 0;
        constraints.gridy = 3;
        constraints.gridwidth = 1;
        constraints.gridheight = 1;
        contents.add(VipAgeLabel, constraints);
        constraints.gridx = 1;
        constraints.gridy = 3;
        constraints.gridwidth = 2;
        constraints.gridheight = 1;
        contents.add(VipAgeField, constraints);
		//5
		VipPositionField = new JTextField(); // needed below
        VipPositionField.setPreferredSize(new Dimension(150, 25));
        VipPositionLabel = new JLabel();
        VipPositionLabel.setText("會 員 職 位:        ");
        VipPositionLabel.setLabelFor(VipPositionField);
        constraints.gridx = 0;
        constraints.gridy = 4;
        constraints.gridwidth = 1;
        constraints.gridheight = 1;
        contents.add(VipPositionLabel, constraints);
        constraints.gridx = 1;
        constraints.gridy = 4;
        constraints.gridwidth = 2;
        constraints.gridheight = 1;
        contents.add(VipPositionField, constraints);    
        
        JPanel buttonPanel = createButtonPanel(); // sets global loginButton
        constraints.gridx = 0;
        constraints.gridy = 5;
        constraints.gridwidth = 3;
        constraints.gridheight = 2;
        contents.add(buttonPanel, constraints);
        
        setSize( 500, 300 );
      	setResizable(false);
      	setLocation(200,100);	
    }
    
     private JPanel createButtonPanel() {

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, 0));
        //panel.setSize( 490, 40 );
        //panel.setBorder(BorderFactory.createEtchedBorder());

        // login button (global variable)
        SubmmitButton = new JButton();
        SubmmitButton.setText("確  定");
        
        SubmmitButton.addActionListener(new ActionListener() 
        {
            public void actionPerformed(ActionEvent event) 
            {
                VipInfoInput();
            }
        });
        panel.add(SubmmitButton);

        // space
        panel.add(Box.createRigidArea(new Dimension(200,0)));

        // cancel button
        JButton cancelButton = new JButton();
        cancelButton.setText("返  回");
        
        cancelButton.addActionListener(new ActionListener() 
        {
            public void actionPerformed(ActionEvent event) 
            {
                dispose();
            }
        });
        panel.add(cancelButton);

        // space
        

        Vector buttons = new Vector(2);
        buttons.add(SubmmitButton);
        buttons.add(cancelButton);
        equalizeComponentSizes(buttons);
        buttons.removeAllElements(); // simplify gc
        return panel;
    } // createButtonPanel()


    private void equalizeComponentSizes(java.util.List components) {

        // Get the largest width and height
        int i = 0;
        Dimension maxPreferred = new Dimension(0,0);
        JComponent oneComponent = null;
        Dimension thisPreferred = null;
        for (i = 0; i < components.size(); ++i) {
            oneComponent = (JComponent)components.get(i);
            thisPreferred = oneComponent.getPreferredSize();
            maxPreferred.width =
                Math.max(maxPreferred.width, (int)thisPreferred.getWidth());
            maxPreferred.height =
                Math.max(maxPreferred.height, (int)thisPreferred.getHeight());
        }

        // reset preferred and maximum size since BoxLayout takes both
        // into account
        for (i = 0; i < components.size(); ++i) {
            oneComponent = (JComponent)components.get(i);
            oneComponent.setPreferredSize((Dimension)maxPreferred.clone());
            oneComponent.setMaximumSize((Dimension)maxPreferred.clone());
        }
    } // equalizeComponentSizes()
    
    private void VipInfoInput()
    {
   	  if(
   		   VipSerialField.getText().equals( "" )||
   		   VipJoinTimeField.getText().equals( "" )||
   		   VipNameField.getText().equals( "" )||
   		   VipAgeField.getText().equals( "" )||
   		   VipPositionField.getText().equals( "" ))
   		{
   			JOptionPane.showMessageDialog( this,"請填好會員資料" ); 
         	//setTitle( "無記錄顯示" ); 
         	return; 	
   		}
   		
   		String url = "jdbc:odbc:VipQuery"; 
    	String username = ""; 
    	String password = ""; 
    	
    	
    	//加載驅動程序以連接數據庫
      	try 
      	{ 
        	Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ); 
        	Insertconnection = DriverManager.getConnection( url, username, password ); 
      	} 
      	//捕獲加載驅動程序異常
      	catch ( ClassNotFoundException cnfex ) 
      	{ 
        	System.err.println("裝載 JDBC/ODBC 驅動程序失敗。" ); 
        	cnfex.printStackTrace(); 
         	System.exit( 1 );  // terminate program 
      	} 
      	//捕獲連接數據庫異常
      	catch ( SQLException sqlex ) 
      	{ 
         	System.err.println( "無法連接數據庫" ); 
         	sqlex.printStackTrace(); 
         	System.exit( 1 );  // terminate program 
      	}
      	
      	try 
      	{ 
      		 String InsertQuery = "select * from VIPID where VIP編號 = "+VipSerialField.getText()+"";
      		 String InsertInput = "insert into VIPID VALUES("
      		 					+ VipSerialField.getText()+",'"+VipJoinTimeField.getText()+"','"
      		 					+VipNameField.getText()+"',"+VipAgeField.getText()+",'"
      		 					+VipPositionField.getText()+"')";
      		
      		 Insertstatement = Insertconnection.createStatement();
         	 InsertresultSet = Insertstatement.executeQuery( InsertQuery );  
         	 
         	 boolean moreRecords = InsertresultSet.next();     
         	 
         	 if ( moreRecords ) 
      		 { 
         		JOptionPane.showMessageDialog( this,"對不起,此VIP號以被使用,請重新輸入" ); 
         		//setTitle( "無記錄顯示" );
         		Insertconnection.close(); 
         		return; 
      		 }  
      		 //InsertInputstatement =  Insertconnection.createStatement();
      		 int insert = Insertstatement.executeUpdate( InsertInput );//executeUpdate返回一個整型值
      		 
      		 if (insert == 1)
      		 {
      		 	JOptionPane.showMessageDialog( this,"會員注冊成功!" );
      		 	VipSerialField.setText("");
   		   		VipJoinTimeField.setText("");
   		   		VipNameField.setText("");
   		   		VipAgeField.setText("");
   		   		VipPositionField.setText("");
      		 } 
      	} 
      	catch ( SQLException sqlex ) 
      	{ 
        	sqlex.printStackTrace(); 
      	}  
        
   		    
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃视频在线观看一区| 日韩欧美亚洲国产另类| 成人欧美一区二区三区白人| 国产高清成人在线| 国产日韩欧美高清在线| 成人永久免费视频| 亚洲靠逼com| 欧美三级在线看| 视频一区中文字幕| 精品国产乱码久久| 成人激情动漫在线观看| 高清成人免费视频| 一区二区在线看| 欧美一区二区视频在线观看2022| 免费欧美在线视频| 欧美国产精品久久| 欧美午夜精品一区| 精品一区在线看| 国产精品美女视频| 欧美日本一区二区三区| 黄页视频在线91| 综合av第一页| 欧美一区二区不卡视频| 成人性生交大片免费看中文网站| 亚洲天堂网中文字| 日韩欧美一级在线播放| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 91极品美女在线| 日韩1区2区3区| 中文字幕精品三区| 在线电影一区二区三区| 国产呦精品一区二区三区网站| 亚洲女人的天堂| www国产成人| 国产精品久久久久久亚洲毛片 | 美女mm1313爽爽久久久蜜臀| 国产三级欧美三级日产三级99| 在线观看成人小视频| 激情图区综合网| 亚洲电影第三页| 国产精品视频一二三区| 在线不卡免费欧美| 91在线一区二区| 国内精品不卡在线| 天堂成人国产精品一区| 亚洲色图在线视频| 久久久久久综合| 欧美美女直播网站| 色综合天天性综合| 国产成人啪免费观看软件 | 亚洲欧美色一区| 久久毛片高清国产| 欧美久久一二区| 在线视频亚洲一区| 2022国产精品视频| 欧美片网站yy| 91黄色激情网站| av福利精品导航| 国产精品中文字幕欧美| 看片网站欧美日韩| 午夜欧美一区二区三区在线播放| 中文字幕一区二区在线播放| 久久久综合视频| 精品免费视频.| 欧美一区二区在线视频| 欧美日韩不卡一区| 欧美性xxxxxx少妇| 欧美综合久久久| 日本高清不卡视频| 欧美中文字幕一区| 欧洲亚洲国产日韩| 欧美私模裸体表演在线观看| 91女神在线视频| 91国产丝袜在线播放| 97精品久久久午夜一区二区三区| 丁香另类激情小说| 高清不卡一二三区| 波多野洁衣一区| 成人免费看黄yyy456| 白白色亚洲国产精品| 成人自拍视频在线观看| 国产91综合网| 99久久精品国产一区二区三区| 成人一区二区三区在线观看| 成人高清伦理免费影院在线观看| 成人少妇影院yyyy| 91丝袜美腿高跟国产极品老师 | 国产成人无遮挡在线视频| 国产成人精品一区二| 成人精品高清在线| 91蜜桃在线免费视频| 在线精品视频一区二区三四| 欧美性欧美巨大黑白大战| 6080日韩午夜伦伦午夜伦| 日韩午夜av一区| 久久人人爽人人爽| 亚洲天堂福利av| 亚洲第一av色| 极品瑜伽女神91| 成人h动漫精品一区二区| 色婷婷久久一区二区三区麻豆| 欧美三电影在线| 精品少妇一区二区三区日产乱码| 2023国产精品| 中文字幕日韩一区| 亚洲国产精品综合小说图片区| 视频一区二区三区中文字幕| 91精品国产手机| 久久伊人中文字幕| 亚洲伦理在线精品| 美女国产一区二区三区| 成+人+亚洲+综合天堂| 欧美日韩精品一区二区在线播放| 日韩无一区二区| 1000部国产精品成人观看| 日本伊人色综合网| 成人性色生活片免费看爆迷你毛片| 色系网站成人免费| 日韩免费在线观看| 国产精品久久久久影院亚瑟| 丝袜美腿成人在线| 成人高清视频在线| 91精品国产91综合久久蜜臀| 国产精品久久看| 理论电影国产精品| 色哟哟精品一区| 久久一夜天堂av一区二区三区| 亚洲精品写真福利| 国产乱淫av一区二区三区| 欧洲亚洲精品在线| 国产精品久久综合| 久久精品国产免费| 在线欧美一区二区| 国产欧美一区二区三区在线看蜜臀| 亚洲一区二区高清| 成人在线综合网站| 精品国产a毛片| 亚洲成人av一区二区| 成人免费看视频| 精品国产成人系列| 欧美亚男人的天堂| 欧美激情在线观看视频免费| 日本va欧美va精品发布| 在线视频你懂得一区二区三区| 国产亚洲美州欧州综合国| 天堂午夜影视日韩欧美一区二区| 99久久婷婷国产综合精品电影 | 欧美年轻男男videosbes| 亚洲欧洲国产专区| 国产精品一卡二卡在线观看| 精品人伦一区二区色婷婷| 亚洲大片一区二区三区| 色综合天天做天天爱| 日本一区二区高清| 国产精品综合一区二区| 欧美一区二区三区在线视频| 亚洲v精品v日韩v欧美v专区| 99久久精品国产导航| 欧美国产成人在线| 国产成人av电影在线播放| 2024国产精品视频| 久久99精品国产.久久久久久| 欧美肥大bbwbbw高潮| 亚洲一区二区三区激情| 欧美在线免费观看亚洲| 亚洲摸摸操操av| 色综合 综合色| 国产999精品久久久久久绿帽| 久久免费国产精品| 国产宾馆实践打屁股91| 国产欧美一区二区三区沐欲| 国产伦精品一区二区三区在线观看 | 亚洲一区免费观看| 99精品欧美一区二区蜜桃免费| 国产精品久久久一区麻豆最新章节| 岛国精品一区二区| 《视频一区视频二区| 91麻豆免费看| 亚洲影院久久精品| 欧美日韩一区二区三区四区五区| 亚洲一区二区三区四区五区黄 | 日韩免费高清电影| 久久成人免费电影| 久久久久久久综合| 成人av先锋影音| 一区二区三区在线免费播放| 在线观看欧美黄色| 香蕉久久一区二区不卡无毒影院| 91精品国产综合久久久久久漫画| 青青草伊人久久| 久久免费午夜影院| 99re这里只有精品首页| 亚洲影视在线观看| 日韩一区二区不卡| 国产黄色91视频| 亚洲欧美电影一区二区| 欧美日韩黄色影视| 国产老女人精品毛片久久| 中文字幕在线一区| 欧美日韩国产精选|