Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please code in Java Objectives Build a notepad editor. It will have a basic menu, functional menu system that allows the user to control the

Please code in Java

image text in transcribedimage text in transcribed

image text in transcribed

Objectives Build a notepad editor. It will have a basic menu, functional menu system that allows the user to control the appearance of the text in the editor box. Note Editor File Format . Fig 1: Note Editor on launch. Tasks Involved 1) Place a scroll pane and text area on the frame. You must start with a GridBagLayout: gridx = 0 gridy - 0 editor ScrollPane 2) Set the properties: a) NotePadEditor Frame: title, resizable b) editor ScrollPane: preferredSize, vewportView, gridx, gridy c) editorAreaText : font, lineWrap, wrapStyle Word 3) Add a menu system, as per the screenshots below: X Note Editor Fire Format . Italic Size Small Medium 2 Large Figure 2: Format menu and Size submenu open. Note Editor New C Open Cho Save CHE Figure 3: File menu open. 4) Name and accelerator keys for the menu bar Text File New Open Save Edit Exit Format Bold Name TeMenu hew Menuitem ppen Menuitem SaveMenulter Edit Menulter exitMenuitem format Menu pold Menultem (checkbox) Accelerator NA N S E None NA -B Lab Submission Date on ERS Italic Size Small talicMenultem (checkbox) size Menu smallMenultem (RadioButton-sizeGroup) medium Menultem (RadioButton-sizeGroup) argeMenultem (RadioButton-sizeGroup) - N/A -1 -2 -3 Medium Large 5) Add the listeners and their corresponding code for event methods depending on the selection of the corresponding menu items. Make sure to set the text area font and size routine based on the 'Format' menu choices. Goals To successfully complete this assessment and obtain all the marks, you must: a) Assure that 'Format menu' works in accordance with the checkbox and radio buttons' selection b) Assign an icon to the notePad frame. You may use the image of your choosing. c) Declare that window close button and exit menu option will let the application know when to close d) The window close listener must report something to the console before closing. e) Be able to compile and execute this code from the command line. You will be called upon to do so, so have your command prompt ready during your lab session. f) "New" must erase the contents of the text area. g) The load menu item must open a file chooser to allow the user to select one and only one).txt file. It should then load the text file and display its contents in the text area. h) The save menu item must use the file chooser system to permit the user to save the contents as a .txt file, with the name and location of their choosing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

Explain the causes of indiscipline.

Answered: 1 week ago