Question: What You Will Learn Basic button tracking Implementing Action Listeners Deliverables app.java (initial application) MainFrame.java (external JFrame) A Java class for the control panel, that

What You Will Learn

  • Basic button tracking
  • Implementing Action Listeners

Deliverables

  • app.java (initial application)
  • MainFrame.java (external JFrame)
  • A Java class for the control panel, that will contain the 2 new panels, using a layout.
  • A Java class for the Panel that will display the groups name and group's average GPA
  • A Java class for the Panel that will display names and semester GPAs of the 4 students in a group.
  • group.java and student.java (a working version from previous labs, no changes needed).
  • Students should apply consistent indenting in all submissions. This can be done via the NetBeans Source menu.

Contents

You will start with a working version from the previous lab. All requirements are still the same including "You will create only one group object g1 in this assignment. There will be only one statement group g1 = new group(...); in the whole application."

Additional requirements are below.

You will be listening to the 4 buttons with student information. Every time a user clicks on one of the buttons, the GPA will be recalculated using semesterGPA and displayed again.

When a student GPA is recalculated, the group average GPA has to be updated too and displayed again.

Important - #1 - Where to implement the ActionListener?

It is a requirement that you implement the ActionListener in ControlPanel, which is the panel that contains the other two panels.

You have to use the traditional model for listening that you have been using so far

public class ControlPanel extends JPanel implements ActionListener

The ActionListener will be implemented in the ControlPanel, the external panel that contains the other two panels. A container panel with a border layout. It has two panels. The ActionListener will be implemented here. Nittany Lions group average GPA is 2.53 You will listen to this button and A panel with 3 buttons displaying information extracted from a group object. Uses the default layout. NAME- Zack Smith 2.65 when it is clicked it will recalculate and display the GPA again. You will listen to this button and NAME Robert Jones 3.44 when it is clicked it will recalculate A panel with 4 buttons with group student's names and with student's semester GPAs extracted from a group object. Uses a grid layout. The 4 buttons will be listened to and they will display the recalculated GPA when they are clicked. and display the GPA again. You will listen to this button and NAME - Jennifer Morris 2.0 when it is clicked it will recalculate and display the GPA again. You will listen to this button and when it is clicked it will recalculate and display the GPA again. NAME Megan Hilton 2.03

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!