1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive. 2. Create a new project named LabExer8. Set the project location to your own folder. 3. Construct import statements to use the packages listed below: • javax.swing • java.awt • java.awt.event 4. Extend the JFrame class and implement the ActionListener interface. 5. Create a JMenuBar named mainBar and two (2) JMenu objects named menu1 and menu2. Set the text of menu1 as File and the text of menu2 as Event Type. 6. Create the items that will appear in the menus. The File menu shall contain an Exit submenu. Name the object exit. The Event Types menu shall contain two (2) submenus: Adult and Child. Name the objects adult and child, respectively. The Adult submenu shall consist of: Birthday (adultBday), Anniversary (anniv), Retirement (retirement), and Other (adultOther). The Child submenu shall consist of Birthday (childBday), and Other (childOther). 7. Declare several other components that will be used in the program. Create two (2) JPanel objects named currentPanel and otherPanel. Create two (2) JLabel objects named currentLabel and otherLabel. The first JLabel has blank text while the second has: We have lots of ideas for memorable events. 8. Write the constructor for the JFrame. Set the title as Party Planner. Set the default close operation and create a FlowLayout object by typing new FlowLayout() within the parentheses of the setLayout() method. 9. Create three (3) methods. Name them composeMenus(), addActionListeners(), and layoutComponents(). 10. For the composeMenus() method, set the main menu bar, and add two (2) menus to it. Then add one (1) option to the first menu and two (2) submenus to the second menu. Finally add four (4) items to the first submenu and two (2) items to the other one. 11. For the addActionListeners() method, set all the submenu options as action listeners. 12. For the layoutComponents() method, add currentLabel to currentPanel then add otherLabel to otherPanel. Add currentPanel and otherPanel to the JFrame. 13. Go back to the constructor and call the three (3) methods you have just created. 14. Write the actionPerformed() method that responds to menu selections. If the Exit submenu is clicked, the program shall terminate. Refer to the following screenshots for the program flow. Event Types > Adult > Birthday

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

1. Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive.
2. Create a new project named LabExer8. Set the project location to your own folder.
3. Construct import statements to use the packages listed below:
• javax.swing
• java.awt
• java.awt.event
4. Extend the JFrame class and implement the ActionListener interface.
5. Create a JMenuBar named mainBar and two (2) JMenu objects named menu1 and menu2. Set the
text of menu1 as File and the text of menu2 as Event Type.
6. Create the items that will appear in the menus. The File menu shall contain an Exit submenu. Name
the object exit. The Event Types menu shall contain two (2) submenus: Adult and Child. Name the
objects adult and child, respectively. The Adult submenu shall consist of: Birthday (adultBday),
Anniversary (anniv), Retirement (retirement), and Other (adultOther). The Child submenu shall
consist of Birthday (childBday), and Other (childOther).
7. Declare several other components that will be used in the program. Create two (2) JPanel objects
named currentPanel and otherPanel. Create two (2) JLabel objects named currentLabel and
otherLabel. The first JLabel has blank text while the second has: We have lots of ideas for
memorable events.
8. Write the constructor for the JFrame. Set the title as Party Planner. Set the default close operation
and create a FlowLayout object by typing new FlowLayout() within the parentheses of the
setLayout() method.
9. Create three (3) methods. Name them composeMenus(), addActionListeners(), and
layoutComponents().
10. For the composeMenus() method, set the main menu bar, and add two (2) menus to it. Then add
one (1) option to the first menu and two (2) submenus to the second menu. Finally add four (4) items
to the first submenu and two (2) items to the other one.
11. For the addActionListeners() method, set all the submenu options as action listeners.
12. For the layoutComponents() method, add currentLabel to currentPanel then add otherLabel to
otherPanel. Add currentPanel and otherPanel to the JFrame.
13. Go back to the constructor and call the three (3) methods you have just created.

14. Write the actionPerformed() method that responds to menu selections.
If the Exit submenu is clicked, the program shall terminate.
Refer to the following screenshots for the program flow.
Event Types > Adult > Birthday

15. 

Party Planner
File Event Types
We have lots of ideas for memorable events
14. Write the actionPerformed () method that responds to menu selections.
If the Exit submenu is clicked, the program shall terminate.
Refer to the following screenshots for the program flow.
Event Types > Adult > Birthday
Party Planner
File Event Types
Celebrate another year!
We have lots of ideas for memorable events
Event Types > Adult > Anniversary
Party Planner
File Event Types
Look forward to golden years!
We have lots of ideas for memorable events
Event Types > Adult > Retirement
Party Planner
File Event Types
Cheers to hardwork!
We have lots of ideas for memorable events
Transcribed Image Text:Party Planner File Event Types We have lots of ideas for memorable events 14. Write the actionPerformed () method that responds to menu selections. If the Exit submenu is clicked, the program shall terminate. Refer to the following screenshots for the program flow. Event Types > Adult > Birthday Party Planner File Event Types Celebrate another year! We have lots of ideas for memorable events Event Types > Adult > Anniversary Party Planner File Event Types Look forward to golden years! We have lots of ideas for memorable events Event Types > Adult > Retirement Party Planner File Event Types Cheers to hardwork! We have lots of ideas for memorable events
Event Types > Adult > Other
Party Planner
File Event Types
We have lots of ideas for memorable events
Event Types > Child > Birthday
Party Planner
File Event Types
Throw the best birthday party!
We have lots of ideas for memorable events
Event Types > Child > Other
Party Planner
File Event Types
We have lots of ideas for memorable events
15. Add the main() method, which instantiates a LabExer8 object and sets its visibility. Set its width to
400 and its height 200.
Transcribed Image Text:Event Types > Adult > Other Party Planner File Event Types We have lots of ideas for memorable events Event Types > Child > Birthday Party Planner File Event Types Throw the best birthday party! We have lots of ideas for memorable events Event Types > Child > Other Party Planner File Event Types We have lots of ideas for memorable events 15. Add the main() method, which instantiates a LabExer8 object and sets its visibility. Set its width to 400 and its height 200.
Expert Solution
steps

Step by step

Solved in 2 steps

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