CreatePanel.java - Assignment 6 Name Zihao Feng StudentID...

This preview shows page 1 - 2 out of 3 pages.

// Assignment #: 6// Name: Zihao Feng// StudentID: 1209476473// Lecture: M/W/F 10:45 am // Description: This class setup the layout // and ButtonListener for the CreatePanel// creat new flight using input informationsimport java.awt.*;import java.awt.event.*;import javax.swing.*;import java.util.*;public class CreatePanel extends JPanel{private ArrayList flightList;private JButton button1;private SelectPanel selectPanel;private JLabel nameL, flightNumL, depCityL, depDayL, depTimeL, arrivalCityL, arrivalDayL, arrivalTimeL, airfareL;private JTextField nameTF, flightNumTF, depCityTF, depDayTF, depTimeTF, arrivalCityTF, arrivalDayTF, arrivalTimeTF, airfareTF;private JLabel message;private JTextArea displayFlightTA;private JPanel flightCreatPanel, panelLeft, leftANDright;private JScrollPane displayFlightSP;//Constructor initializes components and organize them using certain layoutspublic CreatePanel(ArrayList flightList, SelectPanel selectPanel){this.flightList = flightList;this.selectPanel = selectPanel;//name of the JLabe to tell user what to inputnameL = new JLabel("Enter a name of Airline");flightNumL = new JLabel("Enter a flight number");depCityL = new JLabel("Enter a depature city");depDayL = new JLabel("Enter a depature day");

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture