SelectPanel - Assignment 6 Name McCabe Tonna StudentID...

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

// Assignment #: 6 // Name: McCabe Tonna // StudentID: 12002144441 // Lecture: MWF 10:45 // Description: The Assignment 6 class creates a Tabbed Pane with // two tabs, one for Pet creation and one for // Pet selection, and adds it as its Applet content // and also sets its size. import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.util.*; i public class SelectPanel extends JPanel { private Vector<String> petList; private Vector<String> selectedPets; private JList availablePetList; private JList selectedPetList; private JButton petAdd; private JButton petRemove; private JLabel petLabel; private JPanel listAndButtonsPanel; private JPanel availablePetsPanel; private JPanel selectedPetsPanel; private JPanel addRemoveButtonsPanel; public SelectPanel(Vector<String> petList) { this.petList = petList; this.selectedPets = new Vector<String>(); ButtonListener listener = new ButtonListener(); petAdd = new JButton("Add"); petAdd.addActionListener(listener); petRemove = new JButton("Remove"); petRemove.addActionListener(listener);

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture