Implement a graphical application that displays a list of courses. Briefly, this GUI will take the inputs (i.e., course information), store them in an array list, and display course information in the output area. Figure 1 shows the layout ofthe CourseDisplay GUI. You should have three Java files: 1. CourseDisplayFrame class that extendsJFrame class (The main part of your program). 2.CourseDisplayViewer class, which contains the main method where a CourseDisplay object will be created, and the GUI will pop up (Suggested frame width of 450, and frame height of 400). 3.Course class, which is the class that models the Course objects (This file will be given to you). In your CourseDisplayFrame class file, you should have the followings: •Input area: –A text label and a text field (suggested width of 30) for course code; –A text label and a text field (suggested width of 30) for course name; –A text label and a text field (suggested width of 30) for course credit; –A text label and a text field (suggested width of 30) for course grade; •Buttons: –One button (AddCourse) used for adding a course into your course list, and append this course in the output area; –One button (SortByCode) used for sorting the course list by course code. The output should be displayed as in Figure 2. –One button (SortByName) used for sorting the course list by course name. The output should be displayed as in Figure 3. –One button (SortByGrade) used for sorting the course list by course grade. The output should be displayed as in Figure 4. –One button (ResetInput) used for resetting all input fields; •Output area: –One text area (suggested row of 10 and column of 35) that displays course information; You may initialize the text area by including the headings (Code, Name, Credit and Grade). –A scrollpane that includes the output text area; •OneArrayListinstance variable (e.g.,courseList) to store the courses you add; •Five inner ActionListener classes, with each of them implements its method of actionPerformed. Specifically, –AddCourseListener: read the inputs and create a course object, add the course object into the courseList, and append this into the output area; –SortByCodeListener: sort all courses in the list by course code, and display the sorted list in the output area. –SortByNameListener: sort all courses in the list by course name, and display the sorted list in the output area. –SortByGradeListener: sort all courses in the list by course grade, and display the sorted list in the output area. –ResetInputListener: reset all input fields; Important Note: The attached sample program “PersonTester” contains an examples of how to sort a list of people by ID, and Date. This should be useful for you tosorting courses by Code, Name and Grade in this program.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Implement a graphical application that displays a list of courses. Briefly, this GUI will take the inputs (i.e., course information), store them in an array list, and display course information in the output area. Figure 1 shows the layout ofthe CourseDisplay GUI.

You should have three Java files:

1. CourseDisplayFrame class that extendsJFrame class (The main part of your program).

2.CourseDisplayViewer class, which contains the main method where a CourseDisplay object will be created, and the GUI will pop up (Suggested frame width of 450, and frame height of 400).

3.Course class, which is the class that models the Course objects (This file will be given to you).

In your CourseDisplayFrame class file, you should have the followings:

•Input area:

–A text label and a text field (suggested width of 30) for course code;

–A text label and a text field (suggested width of 30) for course name;

–A text label and a text field (suggested width of 30) for course credit;

–A text label and a text field (suggested width of 30) for course grade;

•Buttons:

–One button (AddCourse) used for adding a course into your course list, and append this course in the output area;

–One button (SortByCode) used for sorting the course list by course code. The output should be displayed as in Figure 2.

–One button (SortByName) used for sorting the course list by course name. The output should be displayed as in Figure 3.

–One button (SortByGrade) used for sorting the course list by course grade. The output should be displayed as in Figure 4.

–One button (ResetInput) used for resetting all input fields;

•Output area:

–One text area (suggested row of 10 and column of 35) that displays course information; You may initialize the text area by including the headings (Code, Name, Credit and Grade).

–A scrollpane that includes the output text area;

•OneArrayList<Course>instance variable (e.g.,courseList) to store the courses you add;

•Five inner ActionListener classes, with each of them implements its method of actionPerformed. Specifically,

–AddCourseListener: read the inputs and create a course object, add the course object into the courseList, and append this into the output area;

–SortByCodeListener: sort all courses in the list by course code, and display the sorted list in the output area.

–SortByNameListener: sort all courses in the list by course name, and display the sorted list in the output area.

–SortByGradeListener: sort all courses in the list by course grade, and display the sorted list in the output area.

–ResetInputListener: reset all input fields;

Important Note: The attached sample program “PersonTester” contains an examples of how to sort a list of people by ID, and Date. This should be useful for you tosorting courses by Code, Name and Grade in this program.

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY