Question: You are to implement a JavaFX project that separates its model (application data and logic) from its view and controller (the JavaFX controls and event

You are to implement a JavaFX project that separates its model (application data and logic) from its view and controller (the JavaFX controls and event handlers that create the user interface).

The project must be for the following menu example:

Editing the menu example from: http://docs.oracle.com/javafx/2/ui_controls/menu_controls.htm

To get all necessary files, expand the Show/Hide Application Files item on the right by clicking on the + next to it, then scrolling down to Download Source Code and downloading UIControlSamples.zip

Some additional requirements and information:

You are free to use the layout and control features of JavaFX as you like. There must not be any input/output from/to the console

Your non-GUI classes should be placed in a package called model.

There should not be any references to Buttons/Menus/etc.

the code should not import any classes from the view package

Your JavaFX code should be placed in a package called view.

To better support reusability, use only named EventHandler classes

For the Menu sample, you must convert the anonymous classes to named event handler classes combine the classes where appropriate (see the FXTextHandler class in the Hello, world MVC example and note that it is used for multiple controls)

If you wish to follow the MVC architecture more completely, you could put all event handler classes in a controller package.

You should not maintain a separate copy of the model classes in the view or controller classes.

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!