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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? comprehenquery.java

?? 歡迎使用航空訂售票系統(tǒng) 還有很多不足之處望大家諒解
?? JAVA
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
package flight.query;

import flight.assist.*;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.sql.*;

public class ComprehenQuery extends JPanel implements ActionListener,ItemListener
{
	   //A bean used to connect to the database and execute SQL operation
	static SqlBean sqlBean = new SqlBean();
	
	   //*********************************************************************
	   //Model for the place combobox
    private static DefaultComboBoxModel modelPlace = new DefaultComboBoxModel();   
       //Model for the airfirm combobox
    private static DefaultComboBoxModel modelAirFirm = new DefaultComboBoxModel();
       //Items for the year combobox
    private static Object[] year = {"2004","2005"};
       //Items for the month combobox
 	private static Object[] month = {"1","2","3","4","5","6","7","8","9","10","11","12"};
 	   //Items for the day combobox
 	private static Object[] day = {"1","2","3","4","5","6","7","8","9","10","11","12",
 	                               "13","14","15","16","17","18","19","20","21","22",
 	                               "23","24","25","26","27","28","29","30","31"}; 	                        
 	                         	
 	private  static JComboBox jcbStart = new JComboBox(),jcbFirstArrive = new JComboBox(),
 	                          jcbArrive = new JComboBox(),jcbAirFirm = new JComboBox(modelAirFirm),
 	                          jcbYear1 = new JComboBox(year),jcbYear2 = new JComboBox(year),
 	                          jcbMonth2 = new JComboBox(month),jcbMonth1 = new JComboBox(month),
 	                          jcbDay1 = new JComboBox(day),jcbDay2 = new JComboBox(day);
 	   //*********************************************************************
 	                   
 	private JRadioButton jrbSingle = new JRadioButton("單程",true),
 	                     jrbDouble = new JRadioButton("往返",false),
 	                     jrbMutiple = new JRadioButton("聯(lián)程",false);
 	   
 	   //The program should change the content in the label dynamically,
 	   //so we should put the JLabels as the menber varibles 
 	   //so that we can change their contents in every method of this class
 	private JLabel jlStart,jlFirstArrive,jlArrive,
 	               jlTime1,jlTime2,jlAirFirm,
 	               jlReplaceArrive,jlReplaceTime;
 	                   
       //The program should remove and add components into the framework dynamically
       //according to the query mode you have selected!
       //So we should put the JPanels as the menber varibles 
 	   //so that we can remove and add components in the panels in every method of this class
    private JPanel jpFirstArriveBox,jpTime2Box,jpReplaceArrive,jpArrive1,jpReplaceTime,jpTime2; 
       
    private JButton jbQuery = new JButton("查詢");
    
       //Used to the items choosed from each combobox
    private String start,firstArrive,arrive,leaveWeek,leaveWeek2,backWeek,airFirm,
                   leaveYear,leaveMonth,leaveDay,backYear,backMonth,backDay,
                   leaveYear2,leaveMonth2,leaveDay2;
      
       //Setup GUI in the Constructor method
    public ComprehenQuery()
    {   
        jcbAirFirm.addItem("所有");
        jcbAirFirm.setSelectedItem("所有");
    
           //Make the time combobox show the present time when you first the program 	
    	setDisplayPresentTime();
    	
    	   //*********************************************************************
    	
    	JPanel jp1 = new JPanel();
    	jp1.add(jrbSingle);
    	JPanel jp2 = new JPanel();
    	jp2.add(jrbDouble);
    	JPanel jp3 = new JPanel();
    	jp3.add(jrbMutiple);    	
    	
    	JPanel jpRadioButton = new JPanel();
    	jpRadioButton.setLayout(new GridLayout(5,1)); 
    	jpRadioButton.add(new JLabel("       "));   	
    	jpRadioButton.add(jp1);
    	jpRadioButton.add(jp2);
    	jpRadioButton.add(jp3);
    	jpRadioButton.add(new JLabel("       "));
    	
    	ButtonGroup bg = new ButtonGroup();
    	bg.add(jrbSingle);
    	bg.add(jrbDouble);
    	bg.add(jrbMutiple);
    	
    	   //*********************************************************************
    	
    	JPanel jpStart = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    	jpStart.add(jlStart = new JLabel("        出發(fā)城市:"));
    	
    	JPanel jpFirstArrive = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    	jpFirstArrive.add(jlFirstArrive = new JLabel("                "));
    	
    	JPanel jpArrive = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    	jpArrive.add(jlArrive = new JLabel("        到達(dá)城市:"));
    	
    	JPanel jpTime1Tip = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    	jpTime1Tip.add(jlTime1 = new JLabel("        出發(fā)日期:"));
    	
    	JPanel jpTime2Tip = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    	jpTime2Tip.add(jlTime2 = new JLabel("              "));
    	
    	JPanel jpAirFirm = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    	jpAirFirm.add(jlAirFirm = new JLabel("       航空公司:"));
    	
    	JPanel jpLabels = new JPanel();
    	jpLabels.setLayout(new GridLayout(7,1));    	
    	jpLabels.add(jpStart);
    	jpLabels.add(jpFirstArrive);
    	jpLabels.add(jpArrive);
    	jpLabels.add(jpTime1Tip);
    	jpLabels.add(jpTime2Tip);
    	jpLabels.add(jpAirFirm);
    	jpLabels.add(new JLabel("            "));
    	
    	   //*********************************************************************
    	            
        JPanel jpStartBox = new JPanel(new FlowLayout(FlowLayout.LEFT));
        jpStartBox.add(jcbStart);
        
           //***********************
           //The combobox "jcbFirstArrive" should be removed from and added into the 
           //jpFirstArriveBox dynamically,
           //so create a panel contains an empty label that used to replace 
           //the panel that contains the combobox "jcbFirstArrive" when we don't need it
        jpReplaceArrive = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpReplaceArrive.add(jlReplaceArrive = new JLabel("            "));
    	
    	jpArrive1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpArrive1.add(jcbFirstArrive);
    	
        jpFirstArriveBox = new JPanel(new FlowLayout(FlowLayout.LEFT,0,0));
    	jpFirstArriveBox.add(jpReplaceArrive);
    	   //***********************    	   
    	  
    	JPanel jpArriveBox = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpArriveBox.add(jcbArrive);
    	
    	JPanel jpTime1Box = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpTime1Box.add(jcbYear1);
    	jpTime1Box.add(jcbMonth1);
    	jpTime1Box.add(jcbDay1);
    	
    	   //***********************
    	   //The comboboxes "jcbYear2,jcbMonth2,jcbDay2" should be removed from 
    	   //and added into the jpTime2Box dynamically,
    	   //so create a panel contains an empty label that used to replace
           //the panel that contains the comboboxes "jcbYear2,jcbMonth2,jcbDay2"
    	jpReplaceTime = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpReplaceTime.add(jlReplaceTime = new JLabel("            ")); 
    	
    	jpTime2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpTime2.add(jcbYear2);
    	jpTime2.add(jcbMonth2);
    	jpTime2.add(jcbDay2);
    	
    	jpTime2Box = new JPanel(new FlowLayout(FlowLayout.LEFT,0,0));
    	jpTime2Box.add(jpReplaceTime); 
    	  	//***********************    	  	 	
    	    
    	JPanel jpAirFirmBox = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpAirFirmBox.add(jcbAirFirm);
    	
    	JPanel jpButton = new JPanel(new FlowLayout(FlowLayout.LEFT));
    	jpButton.add(jbQuery);
    	
    	JPanel jpComboBox = new JPanel();
    	jpComboBox.setLayout(new GridLayout(7,1));    
    	jpComboBox.add(jpStartBox);
    	jpComboBox.add(jpFirstArriveBox);
    	jpComboBox.add(jpArriveBox);
    	jpComboBox.add(jpTime1Box);
    	jpComboBox.add(jpTime2Box);
    	jpComboBox.add(jpAirFirmBox);
    	jpComboBox.add(jpButton);
    	
    	    //*********************************************************************
        
        JPanel jpQuery = new JPanel();
        jpQuery.setLayout(new BorderLayout());
        jpQuery.add(jpLabels,BorderLayout.WEST);
        jpQuery.add(jpComboBox,BorderLayout.CENTER);
        
        JPanel jpDown = new JPanel();
        jpDown.setLayout(new BorderLayout());
        jpDown.add(jpRadioButton,BorderLayout.WEST);
        jpDown.add(jpQuery,BorderLayout.CENTER);
        
        JLabel jlTitle = new JLabel("綜合查詢");
        jlTitle.setHorizontalAlignment(JLabel.CENTER);
        jlTitle.setFont(new Font("Tims",Font.BOLD,23));
        this.setLayout(new BorderLayout());
        this.add(jlTitle,BorderLayout.NORTH);
        this.add(jpDown,BorderLayout.CENTER);;
        
           //Add listener to the radio buttons 
           //RadioListener is an inner class which define below
        jrbSingle.addActionListener(new RadioListener());
        jrbDouble.addActionListener(new RadioListener());
        jrbMutiple.addActionListener(new RadioListener());
        
           //Add listener to the time comboboxes
        jcbYear1.addItemListener(this);
        jcbYear2.addItemListener(this);
        jcbMonth1.addItemListener(this);
        jcbMonth2.addItemListener(this);
        
           //Add listener to the query button
        jbQuery.addActionListener(this);    	
    }
    
    public static void updatePlaceComboBox(String newPlace,int insertOrDelete)
    {
    	if (insertOrDelete == 1)
    	{
    		if (modelPlace.getIndexOf(newPlace) == -1)
    		{
	    		modelPlace.addElement(newPlace);
	    		jcbStart.addItem(newPlace);	
	    		jcbFirstArrive.addItem(newPlace);	
	    		jcbArrive.addItem(newPlace);	
    		}
	    	
    	}
    	else if (insertOrDelete == 2)
    	{
    		if (modelPlace.getIndexOf(newPlace) != -1)
    		{
	    		modelPlace.removeElement(newPlace);
	    		jcbStart.removeItem(newPlace);
	    		jcbFirstArrive.removeItem(newPlace);
	    		jcbArrive.removeItem(newPlace);	
    		}    		
    	}   	
    }
    
    public static void updateAirFirmComboBox(String newAirFirm,int insertOrDelete)
    {
    	if (insertOrDelete == 1)
    	{
    		if (modelAirFirm.getIndexOf(newAirFirm) == -1)
    		   jcbAirFirm.addItem(newAirFirm);
    	}
    	   
    	else if (insertOrDelete == 2)
    	{
    		if (modelAirFirm.getIndexOf(newAirFirm) != -1)
	    	   jcbAirFirm.removeItem(newAirFirm);
    	}
    	   
    }
    
       //The method that makes the time combobox show the present time
       //when you first the program 
    public void setDisplayPresentTime()
    {
    	   //Get the instance for the class Calendar which used to get the present time
    	Calendar cal = Calendar.getInstance();
    	
    	   //Because there are two Date classes(java.util.Date--java.sql.Date)
    	   //So we should designate the full name for the java.util.Date class 
    	cal.setTime(new java.util.Date());
    	
    	   //Get the present year,month,day
    	String year = String.valueOf(cal.get(Calendar.YEAR));
    	String month = String.valueOf(cal.get(Calendar.MONTH) + 1);
    	String day = String.valueOf(cal.get(Calendar.DAY_OF_MONTH));
    	
    	   //Make the time combobox show the present time
    	jcbYear1.setSelectedItem(year);
    	jcbYear2.setSelectedItem(year);
    	jcbMonth1.setSelectedItem(month);
    	jcbMonth2.setSelectedItem(month);
    	
    	   //We should change the items in the day combobox dynamically
    	   //according to the year and month
    	updateDay(year,month,jcbDay1);
    	updateDay(year,month,jcbDay2);    	
    	
    	jcbDay1.setSelectedItem(day);
    	jcbDay2.setSelectedItem(day);    	
    }
    
       //The method which used to change the items in the day combobox dynamically
       //according to the year and month
    private void updateDay(String year,String month,JComboBox jcb)
    {
    	   //There are 30 days in the months 4,6,9,11
    	if (month.equals("4") || month.equals("6") || month.equals("9") || month.equals("11"))    	   
    	{
    		   //jcb.getItemCount() == 31 means that there are 31 days in the day combobox,
    		   //but exactly it is 30 days,so we should remove the 31st day from the day combobox
    		if (jcb.getItemCount() == 31)
    		   jcb.removeItem("31");	
    		else if(jcb.getItemCount() == 29)    		
    		   jcb.addItem("30");    	
    		else if (jcb.getItemCount() == 28)
    		{
    			jcb.addItem("29");
    			jcb.addItem("30");
    		}    	
    	}
    	   //There are 28 or 29 days in the month 2
    	else if (month.equals("2"))
    	{
    		int years = Integer.parseInt(year);
    		
    		   //The year is leap year
    		if ( (years % 400 == 0) || (years %4 == 0 && years % 100 != 0))
    		{
    			if (jcb.getItemCount() == 31)
    			{
    				jcb.removeItem("30");
    			    jcb.removeItem("31");    		    			
    			}
    			else if (jcb.getItemCount() == 30)
    			{

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本免费在线视频不卡一不卡二 | 国产精品拍天天在线| 亚洲国产精品成人综合| 亚洲视频 欧洲视频| 亚洲丶国产丶欧美一区二区三区| 蜜桃久久久久久| 成人美女在线观看| 欧美日韩免费电影| 国产性色一区二区| 夜夜精品视频一区二区| 精品中文av资源站在线观看| 成人avav在线| 日韩午夜三级在线| 亚洲欧美日韩国产中文在线| 日韩一区精品视频| 国产福利一区在线观看| 欧美日韩视频在线一区二区| 国产亚洲一本大道中文在线| 亚洲国产美国国产综合一区二区| 国产一区二区免费在线| 色婷婷av一区二区三区大白胸| 日韩欧美国产三级电影视频| 亚洲人亚洲人成电影网站色| 蜜桃视频在线一区| 91精品办公室少妇高潮对白| 久久蜜桃av一区二区天堂| 亚洲一区二区三区免费视频| 国产成人h网站| 欧美一区二区免费视频| 亚洲女同ⅹxx女同tv| 国产精品18久久久久久久久久久久| 91免费版pro下载短视频| 2021国产精品久久精品| 午夜视频在线观看一区二区三区| 不卡一区二区在线| 久久亚洲综合色一区二区三区| 午夜国产精品影院在线观看| 一本色道**综合亚洲精品蜜桃冫| 久久久久久免费网| 视频一区欧美精品| 欧美专区日韩专区| 1000精品久久久久久久久| 国产一区二区不卡| 日韩欧美一区二区视频| 亚洲一区二区五区| 成人99免费视频| 国产校园另类小说区| 久久www免费人成看片高清| 欧美又粗又大又爽| 亚洲美女电影在线| 99精品视频中文字幕| 欧美国产欧美综合| 国产米奇在线777精品观看| 日韩一二三区视频| 青青草国产精品亚洲专区无| 欧美日产在线观看| 婷婷亚洲久悠悠色悠在线播放 | 亚洲精品免费播放| 成人av先锋影音| 久久久噜噜噜久久人人看| 另类的小说在线视频另类成人小视频在线 | 欧美三级三级三级| 亚洲主播在线播放| 欧美亚洲国产一区在线观看网站 | 色哟哟精品一区| 亚洲男人的天堂在线aⅴ视频| 国产精品一二三四| 国产亚洲欧美日韩在线一区| 国产一区91精品张津瑜| 久久先锋资源网| 国产精品主播直播| 欧美激情综合五月色丁香小说| 国产激情91久久精品导航 | 国产91精品在线观看| 国产人妖乱国产精品人妖| 国产精品88888| 欧美激情一区二区三区| 成人综合在线观看| 综合色中文字幕| 色婷婷亚洲综合| 性做久久久久久免费观看| 欧美喷水一区二区| 美美哒免费高清在线观看视频一区二区| 欧美精品在欧美一区二区少妇| 天堂一区二区在线免费观看| 7777女厕盗摄久久久| 免费观看在线综合色| 欧美成人aa大片| 丁香啪啪综合成人亚洲小说| 国产精品成人网| 色噜噜狠狠色综合中国| 亚洲线精品一区二区三区| 91精品国产免费| 久久精品国产久精国产爱| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 国产成人午夜高潮毛片| 综合在线观看色| 欧美人与z0zoxxxx视频| 麻豆国产精品777777在线| 久久精品人人做人人爽人人| 波多野结衣一区二区三区| 一区二区三区 在线观看视频| 91精品国产综合久久久久久久久久 | www.视频一区| 亚洲一区二区三区四区在线观看 | 免费一区二区视频| 久久久久国产免费免费 | 亚洲综合偷拍欧美一区色| 欧美一区二区三区在线观看| 国产综合色视频| 亚洲婷婷综合色高清在线| 欧美日韩三级视频| 国产乱妇无码大片在线观看| 自拍偷在线精品自拍偷无码专区 | 日韩精品国产欧美| 国产日韩欧美精品综合| 在线亚洲+欧美+日本专区| 蜜臀精品久久久久久蜜臀| 亚洲欧洲日产国码二区| 欧美美女bb生活片| 成人动漫视频在线| 日韩av不卡在线观看| 欧美激情在线观看视频免费| 欧美日本不卡视频| av不卡在线观看| 免费成人小视频| 亚洲美女少妇撒尿| 久久久久久黄色| 欧美电影影音先锋| 91网上在线视频| 国产一区二区在线观看视频| 亚洲妇熟xx妇色黄| 国产精品伦理一区二区| 日韩欧美一级在线播放| 91激情五月电影| 丁香激情综合国产| 蜜臀a∨国产成人精品| 亚洲精品五月天| 国产三级欧美三级| 欧美一级淫片007| 91久久精品国产91性色tv| 国产精品亚洲视频| 美女高潮久久久| 天堂影院一区二区| 亚洲人成影院在线观看| 久久久蜜桃精品| 日韩视频一区二区三区| 欧美色中文字幕| 色综合天天在线| 成人一区二区三区中文字幕| 麻豆一区二区在线| 五月婷婷激情综合| 亚洲精品国产无天堂网2021| 中文字幕国产精品一区二区| 精品成a人在线观看| 在线观看91精品国产麻豆| 91久久国产最好的精华液| 99久久综合狠狠综合久久| 国产一区二区在线观看免费| 日本午夜一本久久久综合| 亚洲国产综合色| 亚洲最新视频在线播放| 亚洲视频一区在线| 国产精品美女久久久久久久久| 26uuu色噜噜精品一区| 日韩欧美亚洲另类制服综合在线| 欧美日韩一卡二卡三卡 | 日韩高清电影一区| 性做久久久久久久免费看| 一区二区三区在线看| 18成人在线观看| 亚洲视频每日更新| 中文字幕一区二区三区不卡在线 | 成人少妇影院yyyy| 国产成人精品一区二| 国产精品资源在线| 国产成人免费9x9x人网站视频| 国产真实乱对白精彩久久| 蜜桃精品在线观看| 九九国产精品视频| 国产乱子伦一区二区三区国色天香| 久久97超碰国产精品超碰| 捆绑变态av一区二区三区| 免费观看久久久4p| 韩国成人福利片在线播放| 国产综合色在线| 丁香啪啪综合成人亚洲小说| www.综合网.com| 色屁屁一区二区| 欧美色涩在线第一页| 在线成人小视频| 欧美videossexotv100| 亚洲精品一线二线三线| 国产欧美1区2区3区| 中文字幕一区二区三区蜜月| 一区二区三区四区精品在线视频| 亚洲综合色视频| 免费人成黄页网站在线一区二区| 久久99久国产精品黄毛片色诱| 国产精品996|