Assignment6

Assignment6 - public void init() { //list of pets to be...

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

View Full Document Right Arrow Icon
// Assignment #: 6 // Name: To be completed // StudentID: To be completed // Lecture: To be completed // 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 javax.swing.*; import java.util.*; public class Assignment6 extends JApplet { private int APPLET_WIDTH = 500, APPLET_HEIGHT = 200; private JTabbedPane tPane; private CreatePanel createPanel; private SelectPanel selectPanel; private Vector petList; //The method init initializes the Applet with a Pane with two tabs
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public void init() { //list of pets to be used in every panel petList = new Vector(); //register panel uses the list of pets selectPanel = new SelectPanel(petList); createPanel = new CreatePanel(petList, selectPanel); //create a tabbed pane with two tabs tPane = new JTabbedPane(); tPane.addTab("Pet List Creation", createPanel); tPane.addTab("Pet Selection", selectPanel); getContentPane().add(tPane); setSize (APPLET_WIDTH, APPLET_HEIGHT); //set Applet size } }...
View Full Document

Ask a homework question - tutors are online