SelectPanel

SelectPanel - } private class ButtonListener implements...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// Assignment #: 6 // Name: Sagar Rajpal // StudentID: 1001123295 // Lecture: To be completed // Description: To be completed import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.util.*; public class SelectPanel extends JPanel { private Vector petList; public SelectPanel(Vector petList) { this.petList = petList; // orgranize components for the panel } public void updatePetList() { //This method can refresh the appearance of the list of pets //by calling updateUI() method for the JList. //It can be called from the CreatePanel class whenever a new pet type //is added to the vector and the JList appearence needs to be refreshed.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } private class ButtonListener implements ActionListener { public void actionPerformed(ActionEvent event) { //When the added button is pushed, the selected pet //should be added to the right list and the number of //selected pets is incremented by 1. //When the remove button is pushed, the selected pet //should be removed from the right list and the number of //selected pets is decremented by 1. // //Be careful for the cases when no item has been selected. } } //end of ButtonListener class } //end of SelectPanel class...
View Full Document

Ask a homework question - tutors are online