GradeReportProgram

GradeReportProgram - /Main program import import import...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
//Main program / import java.io.*; import java.util.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; i public class GradeReportProgram extends JFrame { private static final int WIDTH = 550; private static final int HEIGHT = 430; private static final int MAX_NNUMBER_OF_STUDENTS = 10; //instance variables private Student[] studentList = new Student[MAX_NNUMBER_OF_STUDENTS]; private int noOfStudents; private double tuitionRate; private int displayedStudentIndex = 0; //GUI components //Each of the items to be displayed needs //a label and text field. //Labels end with L and text fields end with TF. private JLabel headingL, stNameL, stIDL, noCoursesL, courseListL, creditHrsL, gpaL; private JTextField stNameTF, stIDTF, noCoursesTF, creditHrsTF, gpaTF; private JTextArea courseListTA; private JButton exitB, nextB, prevB, firstB, lastB; private ButtonHandler bHandler; public GradeReportProgram() { setTitle("Student Information"); //set the window title setSize(WIDTH, HEIGHT); //set the window size Container pane = getContentPane(); //get the container pane.setLayout(null); //set the container's layout to null bHandler = new ButtonHandler(); //instantiate the button //event handler //instantiate the labels headingL = new JLabel("STUDENT RECORD"); stNameL = new JLabel("Student Name ", SwingConstants.RIGHT); stIDL = new JLabel("Student ID ", SwingConstants.RIGHT); noCoursesL = new JLabel("Number of Courses ", SwingConstants.RIGHT); courseListL = new JLabel("Course no " + "Course name " + " Credits " + " Grade"); creditHrsL = new JLabel("Credit Hours ", SwingConstants.RIGHT); gpaL = new JLabel("Midsemester GPA ",
Background image of page 1

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

View Full DocumentRight Arrow Icon
SwingConstants.RIGHT);
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/17/2011 for the course COMP 2301 taught by Professor Staff during the Spring '10 term at Kennesaw.

Page1 / 5

GradeReportProgram - /Main program import import import...

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

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