GUI program using JavaFX codes that enables the user to control…
Question Answered step-by-step GUI program using JavaFX codes that enables the user to control… GUI program using JavaFX codes that enables the user to control various aspects of drawing from a ComboBox as well as display all information in the TextArea.Set up the menu bar for File and Text menu. See the following figures. i. File menu includes Shape, Edit, separator, and Exit submenu. · Shape submenu include five (5) submenus, which create from RadioMenuItem object: Circle (the default), Oval, Rectangle, Square, and Line etc. · Event handle for each submenu: Shape submenu includes shapes which match with the shapes in the ComboBox. i.e., if you select “Rectangle”, the ComboBox will also display “Rectangle”. · Edit submenu includes undo and Clear submenus. a Event handlers for each submenu. · Exit submenu – event handling for ending the program. ii. Text menu includes all submenus for changing TextArea’s information text color, and font. Text menu includes Color and Font submenus. See below figures.· Color submenu: a. Includes four RadioMenuItems. b. Allow the user to select Black, Blue (the default), Red, and Green color for the text color. Need to use ToggleGroup to group together. · Font submenu: a. Includes Name and Style submenus. i. Name submenu: allow the user to select Helvetica (default), Sans-Serif or Serif RadioMenuItems for changing font name. 1. Need ToggleGroup to group together ii. Style submenu: Provide a Bold CheckMenuItem and an Italic CheckMenuItem, which, if checked, makes the text bold, italic or both. · Event handlers for all necessary submenus. This program allows the user to:Select which shape to draw from a comb box. A ComboBox class should provide options including “Circle”, “Oval”, “Rectangle”, “Square”, “Line”, etc.The first item in the ComboBox should be Circle (the default shape).Specify whether a shape should be filled or empty when it is drawn. The user should click a “Filled Color” CheckBox to indicate filled or empty. In addition, if the drawing comboBox selects the “Line” option, then this check box will be disable to click.Select the drawing color from four “Drawing Color”: Black (the default color), Red, Green, and Blue radio buttons as well as choose the drawing color from a ColorPicker dialog box. (see Figure 4) Professor Sylvia Yeung Page 4Pen Size with 2 pixels, 4 px (the default size) and 6 px for line width if the “Filled Color” check box is not selected.Three buttons: Undo, Clear and Exit buttons.· Undo the previous drawing from Undo button and undo submenu under File menu · Clear button and Clear submenu under File menu remove all drawings. · Exit button and Exit submenu under File menu: terminate the program (Bottom-Left) Label will display the appropriate coordinates when the mouse moves. i.e., Mouse move: [120.0, 342.0]Set the TextArea with the default text color to blue and background color to white. Un-Editable TextArea object with the scroll bar displays all information includes shape, coordinates (x1, y1) and (x2, y2), area and perimeter which invokes from getArea() and getPerimeter() methods for all bounded shapes as well as getName() for all shapes from classes you have created from the previous assignment.· The coordinate displays with one decimal places · The values of area and perimeter display with two decimal places. · In addition, the text area will display all history viii. Event handlers for all necessary objects. Allow the user to press the mouse button, drag the mouse or release the mouse button to able to draw any shape based on the user choosing fromthe combo box or shape submenu under File menu, the appropriate color, pen size and whether filled color or not. Hint: you can either use “Circle”, “Ellipse”, “Line” and “Rectangle” classes under javafx.scene.shape package (for example: import javafx.scene.shape.Ellipse;) for drawing “Circle”, “Oval”, “Rectangle”, “Square” and “Line” shape onto the pane or use any methods from javafx.scene.canvas, which can fill/or stroke any shapes with GraphicsContextWhen the mouse is pressed, draw a shape with the appropriate top-left corner.When the mouse is released/dragged, draw a shape with the appropriate bottom-right corner, width and height. [Hint: The mousePressed method should capture the set of coordinates at which the user presses and holds the mouse button initially, and the mouseReleased method should capture the set of coordinates at which the user releases the mouse button. Both methods should store the appropriate coordinate values. Image transcription textTextArea. The GUI program is similarto the following figure 1. D X File TestOval Driving Color MELO … Show more… Show moreImage transcription textPainter File Text Painter Shape CircleFile Text Edit Oval Shape ExitRectangle Edit Undo Squ… Show more… Show moreImage transcription textText menu Includes all SuDificilusinformation text color, and font. Textmenu includes Color and … Show more… Show more Computer Science Engineering & Technology Java Programming COMPUTER S 1101 Share QuestionEmailCopy link Comments (0)


