CreatePanel - / Assignment #: / Name: / StudentID: /...

Info iconThis 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 java.util.*; i public class CreatePanel extends JPanel { private Vector<String> petList; private JButton button1; private SelectPanel sPanel; private JLabel label1, label2; private JTextField field1; private JTextArea field2; public CreatePanel(Vector<String> petList, SelectPanel sPanel) { this.petList = petList; this.sPanel = sPanel; label2= new JLabel(""); label1= new JLabel("enter a pet type"); field1 = new JTextField(""); field2 = new JTextArea("No pet"); button1 = new JButton("Create a Pet"); add(button1); //Enter a Pet Type and Text Area JPanel panel2 = new JPanel(); panel2.setLayout(new GridLayout(1,2)); panel2.add(label1); panel2.add(field1);
Background image of page 1

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

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

Page1 / 3

CreatePanel - / Assignment #: / Name: / StudentID: /...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online