Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local Create a new project named LabExer8. Set the project location to your own Construct import statements to use the packages listed below: swing awt awt.event Extend the JFrame class and implement the ActionListener 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. Create the items that will appear in the 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). Declare several other components that will be used in the 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. Write the constructor for the 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. Create three (3) methods. Name them composeMenus(), addActionListeners(), and layoutComponents(). For the composeMenus() method, set the main menu bar, and add two (2) menus to i 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. For the addActionListeners() method, set all the submenu options as action For the layoutComponents() method, add currentLabel to currentPanel then add otherLabel to Add currentPanel and otherPanel to the JFrame. Go back to the constructor and call the three (3) methods you have just created. The initial output shall be:
Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local Create a new project named LabExer8. Set the project location to your own Construct import statements to use the packages listed below: swing awt awt.event Extend the JFrame class and implement the ActionListener 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. Create the items that will appear in the 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). Declare several other components that will be used in the 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. Write the constructor for the 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. Create three (3) methods. Name them composeMenus(), addActionListeners(), and layoutComponents(). For the composeMenus() method, set the main menu bar, and add two (2) menus to i 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. For the addActionListeners() method, set all the submenu options as action For the layoutComponents() method, add currentLabel to currentPanel then add otherLabel to Add currentPanel and otherPanel to the JFrame. Go back to the constructor and call the three (3) methods you have just created. The initial output shall be:
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...
Related questions
Question
- Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local
- Create a new project named LabExer8. Set the project location to your own
- Construct import statements to use the packages listed below:
- swing
- awt
- awt.event
- Extend the JFrame class and implement the ActionListener
- 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.
- Create the items that will appear in the 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).
- Declare several other components that will be used in the 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.
- Write the constructor for the 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.
- Create three (3) methods. Name them composeMenus(), addActionListeners(), and
layoutComponents().
- For the composeMenus() method, set the main menu bar, and add two (2) menus to i 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.
- For the addActionListeners() method, set all the submenu options as action
- For the layoutComponents() method, add currentLabel to currentPanel then add otherLabel to Add currentPanel and otherPanel to the JFrame.
- Go back to the constructor and call the three (3) methods you have just created. The initial output shall be:
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY