CreatePanel.java - Assignment Name StudentID Lecture...

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

// Assignment #: 6 // Name: Kameron Kurtz // StudentID: 1207645474 // Lecture: TTH 4:30 // Description: allows user to enter athlete information and store as an arrayList import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class CreatePanel extends JPanel { private Vector athleteList; private JButton button1; private CountPanel cPanel; private JLabel message, label1, label2, label3; private JTextField field1, field2, field3, field4; private JTextArea info; //Constructor initializes components and organize them using certain layouts public CreatePanel(Vector athleteList, CountPanel cPanel) { this.athleteList = athleteList; this.cPanel = cPanel; //organize components here button1 = new JButton("Create an Athlete"); add(button1); button1.addActionListener(new ButtonListener()); message=new JLabel(); message.setForeground(Color.red); message.setVisible(false); label1=new JLabel("First Name"); label2=new JLabel("Last Name"); label3=new JLabel("Sport"); field1=new JTextField(); field2=new JTextField(); field3=new JTextField(); JPanel panel2=new JPanel(); panel2.setLayout(new GridLayout(3,2));

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture