CreatePanel.docx - import import import import java.awt...

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

import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.util.*;public class CreatePanel extends JPanel{private Vector projectList;private JButton button1;private SelectPanel sPanel;private JLabel label1, label2, label3, label4, error1, error2, set4;private JTextField text1, text2, text3;private JTextArea area;//Constructor initializes components and organize them using certain layoutspublic CreatePanel(Vector projectList, SelectPanel sPanel){this.projectList = projectList;this.sPanel = sPanel;//my code//create all labels, textfields, button, and textarea firstlabel1 = new JLabel("Project Title");label2 = new JLabel("Project Number");label3 = new JLabel("Project Location");label4 = new JLabel("");label4.setForeground(Color.red);error1 = new JLabel("Please enter all fields");error2 = new JLabel("Please enter an integer for the project number");text1 = new JTextField(5);text1.addActionListener(new ButtonListener());text2 = new JTextField(5);text2.addActionListener(new ButtonListener());text3 = new JTextField(5);

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture