{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

SelectPanel - Assignment 6 Name McCabe Tonna StudentID...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// 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);
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}