import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.ArrayList;
import java.text.NumberFormat;
public class SelectPanel extends JPanel
{
private ArrayList flightList;
public SelectPanel(ArrayList flightList)
{
this.flightList = flightList;
JLabel label1= new Jlabel(" Current Total Purchase ");
JTextField field1 = new JTextField()
JCheckBox box1 = new JCheckBox();
// orgranize components for purchase panel
} //end of constructor
/** This method add checkBox for a given flight object to the **/
/** left panel. It also creates a check box listener and **/
/** add it to the checkbox **/
public void addCheckBox(Flight flight1)
{
for(i=0;i<length.flightList[];i++)
{
chk(i+1) = new JCheckBox(flightlist[i].toString());
add(chk(i+1));
//TO BE COMPLETED
}
/** CheckBoxListener defines an action when a checkbox is **/
/** selected or un-selected. It computes the total purchase **/
/** amount based on the new selection **/
private class CheckBoxListener implements ItemListener
{
public void itemStateChanged(ItemEvent event)
{
if(chk1.isSelected())
{
}
// compute the total purchase amount when a check box is
// checked or unchecked.
}
}
// Assignment #: 6
// Name: CHan Wu
// StudentID: 1212010187
// Lecture: 10:30AM T TU
// Description: Class of constructed the SelectPanel Tab.