·ÖÀà
Java BeanʵÏÖº½¿ÕÔ¤¶¨»úƱ¹¦ÄÜÓ¦Óá¬
| ¡¡¡¡Ô¤¶¨¹¹¼þ¹¦ÄÜ˵Ã÷£º |
| ¡¡¡¡1£¬Ô¤¶¨¹¹¼þÓ¦°üº¬¶þ¸öÃæ°å£¬Ô¤¶¨×ùÎ»Ãæ°åÓë³Ë¿ÍÃæ°å |
| ¡¡¡¡2£¬ÔÚ×°ÈëÔ¤¶¨¹¹¼þʱ²»Ó¦ÓпÉÓõij˿ÍÃæ°å |
| ¡¡¡¡3£¬µ±Óû§´òÈëÒªÔ¤¶¨µÄÂÃÐеصã.ÂÃÐÐÈÕÆÚ¼°×ùλºÅʱ£º |
| ¡¡¡¡¡¡¡¡(1)Ê×ÏÈ£¬Ó¦°´ÒÔϸñʽÉú³É³Ë¿ÍºÅ£º |
| ¡¡¡¡¡¡¡¡(2)Æä´Î£¬ÔÚÏÔʾ ÖÐbean´óС£¬ÒÔ¹Û¿´´Ë³Ë¿Í | ³Ë¿ÍºÅʱӦʹ³Ë¿ÍÃæ°åÊǿɼûµÄ Ãæ°å¡£¶øÇÒ£¬Èç¹û´òÈë×ùλºÅΪ | £¨×¢Ò⣺Äã¿ÉÄÜÖØ¶¨BeanBox´°¿Ú 0£¬Ôò²»Ó¦ÏÔʾ³Ë¿ÍÃæ°å¡££© |
| ¡¡¡¡¡¡¡¡(3)µ±Óû§µã»÷³Ë | ¿ÍÃæ°åµÄsubmit°´Å¥Ê±£¬´ËÃæ°å | µÄËùÓÐÓò¿Ø¼þÖÐÎı¾Ó¦ÖÃΪ¿Õ¡¡¡¡ |
| ¡¡¡¡¡¡¡¡(4)ÉÏÃæ²½Öè±»ÖØ¸´£¬Ö±µ½Ëù½ÓÊյij˿ͲÄÁϸöÊýµÈÓÚÔ¤¶¨µÄ×ùλÊýΪֹ |
| ¡¡¡¡4£¬ÔÚÒÑÔ¤¶¨ÁËËùÐè×ùλºÅÖ®ºó£¬¸ø³öËùÔ¤¶¨×ùλºÅµÄÏûÏ¢¿òÓ¦±»ÏÔʾd |
| ¡¡¡¡5,³Ë¿ÍÃæ°åÓ¦×÷Ϊbean´´½¨£¬¿ÉÒÔ°ÑǶÈëÔÚÌú·Ԥ¶¨Ó¦Óûòº½¿ÕÓ¦ÓÃÖÐ |
| ¡¡¡¡6£¬ÄãÐè½ÓÊÜÒÔϸñʽ | Ö®Ò»µÄÂÃÐÐÈÕÆÚ"dd/mm/yy","mm | /dd/yy","dd-Month-yy" |
| ¡¡¡¡-------------------------------- | --------------- |
| ¡¡¡¡/*1 |
| ¡¡¡¡* Program file:¡¡ PsEvent.java |
| ¡¡¡¡* Creat time:¡¡ 08/01/2004 |
| ¡¡¡¡* Creat by:¡¡¡¡¡¡¡¡¡¡InberKong |
| ¡¡¡¡* Last Modify time: |
| ¡¡¡¡* Modify by:¡¡¡¡¡¡ |
| ¡¡¡¡* Function describe: Event Class |
| ¡¡¡¡*/ |
| ¡¡¡¡import java.util.*; |
| ¡¡¡¡public class PsEvent extends Eve | ntObject |
| ¡¡¡¡{ |
| ¡¡¡¡ // |
| ¡¡¡¡ public String number; |
| ¡¡¡¡ public String name; |
| ¡¡¡¡ public String address; |
| ¡¡¡¡ public String phone; |
| ¡¡¡¡ |
| ¡¡¡¡ public PsEvent(Obje | ct source,String m1,String m | 2,String m3,String m4) |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡super(source); |
| ¡¡¡¡¡¡this.number=m1; |
| ¡¡¡¡¡¡this.name=m2; |
| ¡¡¡¡¡¡this.address=m3; |
| ¡¡¡¡¡¡this.phone=m4; |
| ¡¡¡¡ } |
| ¡¡¡¡} |
| ¡¡¡¡------------------ |
| ¡¡¡¡/*2 |
| ¡¡¡¡* Program file:¡¡ PsEventListener.java |
| ¡¡¡¡* Creat time:¡¡ 08/01/2004 |
| ¡¡¡¡* Creat by:¡¡¡¡¡¡¡¡¡¡InberKong |
| ¡¡¡¡* Last Modify time: |
| ¡¡¡¡* Modify by:¡¡¡¡¡¡ |
| ¡¡¡¡* Function describe: Event listener |
| ¡¡¡¡*/ |
| ¡¡¡¡import java.util.*; |
| ¡¡¡¡public interface PsEventListener | extends EventListener |
| ¡¡¡¡{ |
| ¡¡¡¡ public void psPerformed(PsEvent ev); |
| ¡¡¡¡} |
| ¡¡¡¡--------------------------- |
| ¡¡¡¡/*3 |
| ¡¡¡¡* Program file:¡¡ PsBean.java |
| ¡¡¡¡* Creat time:¡¡ 08/01/2004 |
| ¡¡¡¡* Creat by:¡¡¡¡¡¡¡¡¡¡InberKong |
| ¡¡¡¡* Last Modify time: |
| ¡¡¡¡* Modify by:¡¡¡¡¡¡ |
| ¡¡¡¡* Function describe: | Passenger message bean |
| ¡¡¡¡*/ |
| ¡¡¡¡import javax.swing.*; |
| ¡¡¡¡import java.awt.*; |
| ¡¡¡¡import java.awt.event.*; |
| ¡¡¡¡public class PsBean | extends JPanel implements Ac | tionListener |
| ¡¡¡¡{ |
| ¡¡¡¡ JLabel lb_number; |
| ¡¡¡¡ JLabel lb_name; |
| ¡¡¡¡ JLabel lb_address; |
| ¡¡¡¡ JLabel lb_phone; |
| ¡¡¡¡ JTextField tf_number; |
| ¡¡¡¡ JTextField tf_name; |
| ¡¡¡¡ JTextField tf_address; |
| ¡¡¡¡ JTextField tf_phone; |
| ¡¡¡¡ JButton sbmt; |
| ¡¡¡¡ PsEventListener pl;//ÉùÃ÷ʼþ¼àÌý |
| ¡¡¡¡ |
| ¡¡¡¡ |
| ¡¡¡¡¡¡public PsBean() |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡setLayout(new Grid | Layout(5,2));//ÉèÖò¼¾Ö¹ÜÀí | Æ÷ |
| ¡¡¡¡¡¡lb_number=new JLabel("Passenge | r Number:");//´´½¨¶ÔÏó |
| ¡¡¡¡¡¡lb_name=new JLabel("Passenger Name:"); |
| ¡¡¡¡¡¡lb_address=new JLabel("Passeng | er Address:"); |
| ¡¡¡¡¡¡lb_phone=new JLabe | l("Passenger Phone:"); |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡tf_number=new JTextField(15); |
| ¡¡¡¡¡¡tf_name=new JTextField(15); |
| ¡¡¡¡¡¡tf_address=new JTextField(25); |
| ¡¡¡¡¡¡tf_phone=new JTextField(15); |
| ¡¡¡¡¡¡sbmt=new JButton("Submit");¡¡ |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡add(lb_number); |
| ¡¡¡¡¡¡add(tf_number); |
| ¡¡¡¡¡¡add(lb_name); |
| ¡¡¡¡¡¡add(tf_name); |
| ¡¡¡¡¡¡add(lb_address); |
| ¡¡¡¡¡¡add(tf_address); |
| ¡¡¡¡¡¡add(lb_phone); |
| ¡¡¡¡¡¡add(tf_phone); |
| ¡¡¡¡¡¡add(sbmt); |
| ¡¡¡¡¡¡sbmt.addActionListener(this);//¼àÌýʼþ |
| ¡¡¡¡¡¡tf_number.setEnabled(false);¡¡ |
| ¡¡¡¡ } |
| ¡¡¡¡ |
| ¡¡¡¡ |
| ¡¡¡¡ public void actionP | erformed(ActionEvent evt) |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡Object obj=evt.getSource(); |
| ¡¡¡¡¡¡if(obj==sbmt) |
| ¡¡¡¡¡¡{ |
| ¡¡¡¡¡¡ PsEvent ev=new PsEvent(obj,tf e.getText(),tf_address.getText(),tf_ | _number.getText(),tf_nam phone.getText()); |
| ¡¡¡¡¡¡ pl.psPerformed(ev); |
| ¡¡¡¡¡¡} |
| ¡¡¡¡¡¡ |
| ¡¡¡¡ } |
| ¡¡¡¡ |
| ¡¡¡¡ public void PsListe | ner(PsEventListener el) |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡pl=el; |
| ¡¡¡¡ } |
| ¡¡¡¡ public void setPnrno(String ptemp) |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡tf_number.setText(ptemp); |
| ¡¡¡¡ } |
| ¡¡¡¡¡¡ |
| ¡¡¡¡ public void refresh() |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡tf_number.setText(""); |
| ¡¡¡¡¡¡tf_name.setText(""); |
| ¡¡¡¡¡¡tf_address.setText(""); |
| ¡¡¡¡¡¡tf_phone.setText(""); |
| ¡¡¡¡ } |
| ¡¡¡¡ |
| ¡¡¡¡} |
| ¡¡¡¡--------------------- |
| ¡¡¡¡/*4 |
| ¡¡¡¡* Program file:¡¡ Bpanel.java |
| ¡¡¡¡* Creat time:¡¡ 08/01/2004 |
| ¡¡¡¡* Creat by:¡¡¡¡¡¡¡¡¡¡InberKong |
| ¡¡¡¡* Last Modify time: |
| ¡¡¡¡* Modify by:¡¡¡¡¡¡ |
| ¡¡¡¡* Function describe: Book panel bean |
| ¡¡¡¡*/ |
| ¡¡¡¡import java.beans.*; |
| ¡¡¡¡import javax.swing.*; |
| ¡¡¡¡import java.awt.event.*; |
| ¡¡¡¡import java.awt.*; |
| ¡¡¡¡public class Bpanel | extends JPanel implements Ps | EventListener,ActionListener |
| ¡¡¡¡{ |
| ¡¡¡¡ JPanel pnl; |
| ¡¡¡¡ BoxLayout blo; |
| ¡¡¡¡ JLabel label_Date; |
| ¡¡¡¡¡¡¡¡¡¡¡¡JTextField text_Date; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡JLabel label_Place; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡JTextField text_Place; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡JLabel label_NOS; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡JTextField text_NOS; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡JButton button_Book; |
| ¡¡¡¡¡¡ JLabel the_animation; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡String bank_Name="FlyM | yWay Airlines"; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡GridBagLayout gl_t; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡GridBagConstraints gbcs; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ |
| ¡¡¡¡//³Ë¿ÍÃæ°åjavabean |
| ¡¡¡¡PsBean pb; |
| ¡¡¡¡ int t_nos; |
| ¡¡¡¡ int t_count; |
| ¡¡¡¡ String t_passno; |
| ¡¡¡¡¡¡¡¡¡¡¡¡//Date forma | t property with getter and s | etter methods¡¡¡¡ |
| ¡¡¡¡¡¡¡¡¡¡¡¡private String the_datFo | rmat="mm/dd/yy"; |
| ¡¡¡¡¡¡¡¡¡¡¡¡public String getDatFormat() |
| ¡¡¡¡¡¡¡¡¡¡¡¡{ |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡return the_datFormat; |
| ¡¡¡¡¡¡¡¡¡¡¡¡} |
| ¡¡¡¡¡¡¡¡¡¡¡¡public void | setDatFormat(String temps) |
| ¡¡¡¡¡¡¡¡¡¡¡¡{ |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡the_datFormat=temps; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡if(the_datFormat=="mm/dd/yy") |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ t | ext_Date.setText("mm/dd/yy") | ; |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡if(the_datFormat=="dd/mm/yy") |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ text_Date.set | Text("dd/mm/yy"); |
| ¡¡¡¡¡¡¡¡¡¡ if(the_datFormat=="dd-Month-yy") |
| ¡¡¡¡¡¡¡¡ text_Date.setText("dd-Month-yy"); |
| ¡¡¡¡¡¡¡¡¡¡¡¡} |
| ¡¡¡¡¡¡¡¡¡¡¡¡ |
| ¡¡¡¡¡¡¡¡¡¡¡¡public Bpanel() |
| ¡¡¡¡¡¡¡¡¡¡¡¡{ |
| ¡¡¡¡¡¡pnl=new JPanel(); |
| ¡¡¡¡ the_animation=new JLabel(bank_Name); |
| ¡¡¡¡ label_Date=new JLab | el("Enter Date of Travel:"); |
| ¡¡¡¡¡¡¡¡text_Date=new JTextField(20); |
| ¡¡¡¡¡¡¡¡text_Date.setText(the_datFormat); |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ label_Place=new JLabe | l("Enter Place of Travel:"); |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ text_Place=new JTextField(15); |
| ¡¡¡¡ label_NOS=new JLabel("Enter Num | ber of seats to be booked"); |
| ¡¡¡¡ text_NOS=new JTextField(5); |
| ¡¡¡¡¡¡¡¡¡¡¡¡¡¡ button_Bo | ok=new JButton("BOOK SEATS") | ; |
| ¡¡¡¡¡¡¡¡gl_t=new GridBagLayout(); |
| ¡¡¡¡¡¡gbcs=new GridBagConstraints(); |
| ¡¡¡¡¡¡pnl.setLayout(gl_t); |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡gbcs.gridx=3; |
| ¡¡¡¡¡¡gbcs.gridy=10; |
| ¡¡¡¡¡¡gbcs.anchor=GridBa | gConstraints.NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(the_animat | ion,gbcs); |
| ¡¡¡¡¡¡pnl.add(the_animation); |
| ¡¡¡¡¡¡gbcs.gridx=2; |
| ¡¡¡¡¡¡gbcs.gridy=20; |
| ¡¡¡¡¡¡gbcs.anchor=GridBagConstraints | .NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(label_Date,gbcs); |
| ¡¡¡¡¡¡pnl.add(label_Date); |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡gbcs.gridx=4; |
| ¡¡¡¡¡¡gbcs.gridy=20; |
| ¡¡¡¡¡¡gbcs.anchor=GridBa | gConstraints.NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(text_Date,gbcs); |
| ¡¡¡¡¡¡pnl.add(text_Date); |
| ¡¡¡¡¡¡gbcs.gridx=2; |
| ¡¡¡¡¡¡gbcs.gridy=30; |
| ¡¡¡¡¡¡gbcs.anchor=GridBa | gConstraints.NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(label_Place,gbcs); |
| ¡¡¡¡¡¡pnl.add(label_Place); |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡gbcs.gridx=4; |
| ¡¡¡¡¡¡gbcs.gridy=30; |
| ¡¡¡¡¡¡gbcs.anchor=GridBa | gConstraints.NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(text_Place,gbcs); |
| ¡¡¡¡¡¡pnl.add(text_Place); |
| ¡¡¡¡¡¡gbcs.gridx=2; |
| ¡¡¡¡¡¡gbcs.gridy=40; |
| ¡¡¡¡¡¡gbcs.anchor=GridBa | gConstraints.NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(label_NOS,gbcs); |
| ¡¡¡¡¡¡pnl.add(label_NOS); |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡gbcs.gridx=4; |
| ¡¡¡¡¡¡gbcs.gridy=40; |
| ¡¡¡¡¡¡gbcs.anchor=GridBa | gConstraints.NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(text_NOS,gbcs); |
| ¡¡¡¡¡¡pnl.add(text_NOS); |
| ¡¡¡¡¡¡gbcs.gridx=3; |
| ¡¡¡¡¡¡gbcs.gridy=50; |
| ¡¡¡¡¡¡gbcs.anchor=GridBagConstraints | .NORTHWEST; |
| ¡¡¡¡¡¡gl_t.setConstraints(button_Book,gbcs); |
| ¡¡¡¡¡¡pnl.add(button_Book); |
| ¡¡¡¡ |
| ¡¡¡¡¡¡button_Book.addActionListener(this); |
| ¡¡¡¡¡¡textDisplay(); |
| ¡¡¡¡¡¡pb=new PsBean(); |
| ¡¡¡¡¡¡pb.PsListener(this); |
| ¡¡¡¡¡¡blo=new BoxLayout( | this,BoxLayout.Y_AXIS); |
| ¡¡¡¡¡¡this.setLayout(blo); |
| ¡¡¡¡¡¡blo.addLayoutCompo | nent("Booking Panel",pnl); |
| ¡¡¡¡¡¡blo.addLayoutComponent("Passen | ger Panel",pb); |
| ¡¡¡¡¡¡this.add(pnl); |
| ¡¡¡¡¡¡this.add(pb); |
| ¡¡¡¡¡¡pb.setVisible(false);¡¡ |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡¡¡¡¡¡¡} |
| ¡¡¡¡¡¡ public void textDisplay() |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡ Font f=new Font(" | Times New Roman",Font.BOLD,3 | 0); |
| ¡¡¡¡¡¡ the_animation.setFont(f); |
| ¡¡¡¡¡¡ the_animation.setText(bank_Name); |
| ¡¡¡¡ } |
| ¡¡¡¡¡¡¡¡¡¡ |
| ¡¡¡¡ |
| ¡¡¡¡¡¡public void actionPerformed(Ac | tionEvent evt) |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡Object obj=evt.getSource(); |
| ¡¡¡¡¡¡try{ |
| ¡¡¡¡¡¡¡¡¡¡if(Integer.par | seInt(text_NOS.getText())==0 | ) |
| ¡¡¡¡¡¡¡¡ JOptionPane.showMessageDialog(this,new String("Number of Passengers >0"));¡¡ |
| ¡¡¡¡¡¡¡¡¡¡if(obj==button_Book¡¡&& (Integer.parseInt(text_NOS.getText())>0)) |
| ¡¡¡¡¡¡¡¡¡¡{ |
| ¡¡¡¡¡¡¡¡¡¡ text_Date.setEnabled(false); |
| ¡¡¡¡¡¡¡¡¡¡ text_Place.setEnabled(false); |
| ¡¡¡¡¡¡¡¡¡¡ text_NOS.setEnabled(false); |
| ¡¡¡¡¡¡¡¡¡¡ button_Book.setEnabled(false); |
| ¡¡¡¡¡¡¡¡¡¡ |
| ¡¡¡¡¡¡¡¡¡¡ t_count=1; |
| ¡¡¡¡¡¡¡¡ t_passno=text_P im()+String.valueOf(t_co | lace.getText().trim()+text_D unt); | ate.getText().tr |
| ¡¡¡¡¡¡¡¡¡¡ t_nos=Integer.parseInt(te | xt_NOS.getText()); |
| ¡¡¡¡¡¡¡¡¡¡ pb.setPnrno(t_passno); |
| ¡¡¡¡¡¡¡¡¡¡ pb.setVisible(true); |
| ¡¡¡¡¡¡¡¡¡¡} |
| ¡¡¡¡¡¡ } |
| ¡¡¡¡¡¡¡¡¡¡ catch(Exception e) |
| ¡¡¡¡¡¡¡¡¡¡ { |
| ¡¡¡¡¡¡ JOptionPane.showM string is wrong,plese ch | essageDialog(this,new String eck it!"));¡¡¡¡¡¡ | ("NumberFormat For input |
| ¡¡¡¡¡¡¡¡¡¡ } |
| ¡¡¡¡¡¡ |
| ¡¡¡¡ } |
| ¡¡¡¡ public void psPerformed(PsEvent evt) |
| ¡¡¡¡ { |
| ¡¡¡¡¡¡ |
| ¡¡¡¡¡¡t_count++; |
| ¡¡¡¡¡¡if(t_count<=t_nos) |
| ¡¡¡¡¡¡{ |
| ¡¡¡¡¡¡t_passno=text_Place.getText(). ().trim()+String.valueOf(t_count); | trim()+text_Date.getText |
| ¡¡¡¡¡¡pb.refresh(); |
| ¡¡¡¡¡¡pb.setPnrno(t_passno); |
| ¡¡¡¡¡¡} |
| ¡¡¡¡¡¡else |
| ¡¡¡¡¡¡{ |
| ¡¡¡¡¡¡pb.setVisible(false); |
| ¡¡¡¡¡¡t_count--; |
| ¡¡¡¡¡¡JOptionPane.showMessageDialog( "+t_count)); | this,new String("Number of Passenger Added : |
| ¡¡¡¡¡¡text_Date.setText(the_datFormat); |
| ¡¡¡¡¡¡text_Place.setText(""); |
| ¡¡¡¡¡¡text_NOS.setText(""); |
| ¡¡¡¡¡¡text_Date.setEnabled(true); |
| ¡¡¡¡¡¡text_Place.setEnabled(true); |
| ¡¡¡¡¡¡text_NOS.setEnabled(true); |
| ¡¡¡¡¡¡button_Book.setEnabled(true); |
| ¡¡¡¡¡¡pb.refresh(); |
| ¡¡¡¡¡¡t_nos=0; |
| ¡¡¡¡¡¡t_count=0; |
| ¡¡¡¡¡¡} |
| ¡¡¡¡¡¡ |
| ¡¡¡¡ |
| ¡¡¡¡ } |
| ¡¡¡¡¡¡¡¡¡¡¡¡ |
| ¡¡¡¡} |
| ¡¡¡¡------------------ |
| ¡¡¡¡/*5 |
| ¡¡¡¡* Program file:¡¡ app.java |
| ¡¡¡¡* Creat time:¡¡ 08/01/2004 |
| ¡¡¡¡* Creat by:¡¡¡¡¡¡¡¡¡¡InberKong |
| ¡¡¡¡* Last Modify time: |
| ¡¡¡¡* Modify by:¡¡¡¡¡¡ |
| ¡¡¡¡* Function describe: FlyMyWay Airlines |
| ¡¡¡¡*/ |
| ¡¡¡¡import javax.swing.*; |
| ¡¡¡¡import java.awt.event.*; |
| ¡¡¡¡import java.awt.*; |
| ¡¡¡¡public class app extends JFrame |
| ¡¡¡¡{ |
| ¡¡¡¡ Bpanel panel=new Bpanel();//javabean |
| ¡¡¡¡¡¡ public app() |
| ¡¡¡¡¡¡ { |
| ¡¡¡¡¡¡¡¡this.getContentPane().add(panel); |
| ¡¡¡¡¡¡¡¡this.pack(); |
| ¡¡¡¡¡¡¡¡¡¡this.setVisible(true); |
| ¡¡¡¡¡¡ } |
| ¡¡¡¡¡¡ public static voi | d main(String args[]) |
| ¡¡¡¡¡¡ { |
| ¡¡¡¡¡¡¡¡¡¡new app(); |
| ¡¡¡¡¡¡ } |
| ¡¡¡¡} |