-
大小: 419.51 KB文件類型: .rar金幣: 1下載: 0 次發(fā)布日期: 2024-11-03
- 語(yǔ)言: Java
- 標(biāo)簽:
資源簡(jiǎn)介
用Java做的航空訂票系統(tǒng),附數(shù)據(jù)庫(kù),僅供學(xué)習(xí)使用,請(qǐng)勿用于商業(yè)用途。
代碼片段和文件信息
package?flight.query;
import?flight.assist.*;
import?java.awt.*;
import?java.awt.event.*;
import?javax.swing.*;
import?javax.swing.event.*;
import?java.sql.*;
public?class?AirFirmQuery?extends?JPanel?implements?ActionListener
{
???//A?bean?used?to?connect?to?the?database?and?execute?SQL?operation
static?SqlBean?sqlBean?=?new?SqlBean();
???
private?static?DefaultComboBoxModel?model?=?new?DefaultComboBoxModel();
private?static?JComboBox?jcb?=?new?JComboBox(model);
???//Used?to?store?the?item?you?choosed?inth?combobox
private?String?airfirm;
private?JButton?jbQuery?=?new?JButton(“查詢“);
???//Setup?GUI?in?the?Constructor?method
public?AirFirmQuery()
{
???????//*****************************************************
???????
JLabel?jl?=?new?JLabel(“??航空公司查詢“);
????jl.setFont(new?Font(“Times“Font.BOLD23));
????JPanel?jpTop?=?new?JPanel();
????jpTop.add(jl);????
???
????JLabel?jl2?=?new?JLabel(“????????請(qǐng)輸入航班名稱或者本查詢將“);
????jl2.setHorizontalAlignment(JLabel.CENTER);
????jl2.setFont(new?Font(“Times“Font.PLAIN12));
????
????JLabel?jl3?=?new?JLabel(“提供你該航空公司所有的航班情況:“);
????jl3.setHorizontalAlignment(JLabel.CENTER);
????jl3.setFont(new?Font(“Times“Font.PLAIN12));
????JPanel?jpLabel?=?new?JPanel(new?BorderLayout());
????jpLabel.add(jl2BorderLayout.NORTH);
????jpLabel.add(jl3BorderLayout.CENTER);
????
???????//******************************************************
????
????JPanel?jpBox?=?new?JPanel();
????jpBox.add(jcb);
????
????JPanel?jpButton?=?new?JPanel();
????jpButton.add(jbQuery);
????
????JPanel?jp?=?new?JPanel();
????jp.add(jpBox);
????jp.add(jpButton);
????
???????//*****************************************************
????
????JPanel?jpCenter?=?new?JPanel();
????jpCenter.setLayout(new?BorderLayout());
????jpCenter.add(jpLabelBorderLayout.NORTH);
????jpCenter.add(jpBorderLayout.CENTER);
????
????JPanel?jpQuery?=?new?JPanel();
????jpQuery.setLayout(new?BorderLayout());
????jpQuery.add(jpTopBorderLayout.NORTH);
????jpQuery.add(jpCenterBorderLayout.CENTER); ??
????
????this.setLayout(new?BorderLayout());
????this.add(new?JLabel(“????????“)BorderLayout.NORTH);
????this.add(jpQueryBorderLayout.CENTER); ??
????
???????//Add?listener?to?the?query?button
????jbQuery.addActionListener(this);
}
public?static?void?updateAirFirmComboBox(String?newPlaceint?insertOrDelete)
{
if?(insertOrDelete?==?1)
{
if?(model.getIndexOf(newPlace)?==?-1)
???jcb.addItem(newPlace);
}
???
else?if?(insertOrDelete?==?2)
{
if?(model.getIndexOf(newPlace)?!=?-1)
???jcb.removeItem(newPlace);
}
???
}
public?void?actionPerformed(ActionEvent?e)
{
this.airfirm?=?(String)jcb.getSelectedItem();
???//Do?the?query?work
executeAirFirmQuery();
}
public?void?executeAirFirmQuery()
{
???//Form?the?sqlString
String?sqlString?=?“SELECT?DISTINCT?*?FROM?“?+
??
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????132??2009-05-31?11:05??航空訂票系統(tǒng)\Java源碼.url
?????文件??????25138??2004-12-30?17:14??航空訂票系統(tǒng)\完美版\72341.gif
?????文件???????6250??2004-12-30?02:40??航空訂票系統(tǒng)\完美版\AirFirmQuery.java
?????文件???????2970??2004-12-30?15:34??航空訂票系統(tǒng)\完美版\CheckID.java
?????文件??????13775??2004-12-30?15:33??航空訂票系統(tǒng)\完美版\Client.java
?????文件??????13615??2004-12-30?14:42??航空訂票系統(tǒng)\完美版\CommonQuery.java
?????文件??????35049??2004-12-30?14:13??航空訂票系統(tǒng)\完美版\ComprehenQuery.java
?????文件?????????88??2004-12-30?16:44??航空訂票系統(tǒng)\完美版\data\ClientInfo.txt
?????文件???????8064??2004-12-30?12:49??航空訂票系統(tǒng)\完美版\data\db1.ldb
?????文件?????229376??2004-12-30?12:46??航空訂票系統(tǒng)\完美版\data\db1.mdb
?????文件????1264128??2004-12-27?14:18??航空訂票系統(tǒng)\完美版\data\mm
?????文件???????1240??2004-12-30?16:44??航空訂票系統(tǒng)\完美版\data\SeatInfo.txt
?????文件???????8002??2004-12-30?16:46??航空訂票系統(tǒng)\完美版\DeletePanel.java
?????文件???????9459??2004-12-30?02:40??航空訂票系統(tǒng)\完美版\DestinQuery.java
?????文件????????232??2004-12-29?14:45??航空訂票系統(tǒng)\完美版\f.gif
?????文件???????4045??2004-12-30?14:51??航空訂票系統(tǒng)\完美版\flight\assist\SeatInfo.class
?????文件???????1742??2004-12-30?14:51??航空訂票系統(tǒng)\完美版\flight\assist\SqlBean.class
?????文件???????2556??2004-12-30?14:51??航空訂票系統(tǒng)\完美版\flight\assist\UpdateComboBox.class
?????文件??????10550??2004-12-30?15:33??航空訂票系統(tǒng)\完美版\flight\dingpiao\Client.class
?????文件????????557??2004-12-30?15:26??航空訂票系統(tǒng)\完美版\flight\dingpiao\Hangkong$1.class
?????文件??????15256??2004-12-30?15:26??航空訂票系統(tǒng)\完美版\flight\dingpiao\Hangkong.class
?????文件???????1082??2004-12-30?14:50??航空訂票系統(tǒng)\完美版\flight\dingpiao\writeToFile.class
?????文件???????2950??2004-12-30?15:36??航空訂票系統(tǒng)\完美版\flight\Main\CheckID.class
?????文件???????2983??2004-12-30?17:40??航空訂票系統(tǒng)\完美版\flight\Main\Interface.class
?????文件???????1092??2004-12-30?17:21??航空訂票系統(tǒng)\完美版\flight\Main\Main.class
?????文件???????2424??2004-12-30?14:51??航空訂票系統(tǒng)\完美版\flight\manage\DeletePanel$1.class
?????文件???????8089??2004-12-30?14:51??航空訂票系統(tǒng)\完美版\flight\manage\DeletePanel.class
?????文件???????3936??2004-12-30?14:51??航空訂票系統(tǒng)\完美版\flight\manage\InsertPanel$1.class
?????文件???????5202??2004-12-30?14:51??航空訂票系統(tǒng)\完美版\flight\manage\InsertPanel.class
?????文件???????4239??2004-12-30?14:57??航空訂票系統(tǒng)\完美版\flight\manage\Show.class
............此處省略65個(gè)文件信息
評(píng)論
共有 條評(píng)論