Java Reference
In-Depth Information
the same as the linear gradient paint ( LinearGradient ), except that the start X, Y
and the end X, Y are set in a diagonal position, and the cycle method is set to reflect
( CycleMethod.REFLECT ). When specifying the cycle method to reflect
( CycleMethod.REFLECT ), the gradient pattern will repeat or cycle between the
colors. The following code snippet implements the rounded rectangle having a cycle
method of reflect ( CycleMethod.REFLECT ):
LinearGradient cycleGrad = new LinearGradient(50,
50,
70,
70,
false,
CycleMethod.REFLECT,
new
Stop(0f, Color.rgb(0, 255, 0, .784)),
new
Stop(1.0f, Color.rgb(0, 0, 0, .784)));
14-6. Creating Menus
Problem
You want to create standard menus in your JavaFX applications.
Solution
Employ JavaFX's menu controls to provide standardized menu capabilities such as
check box menus, radio menus, submenus, and separators. The following are the main
classes used to create menus.
javafx.scene.control.MenuBar
javafx.scene.control.Menu
javafx.scene.control.MenuItem
Search WWH ::




Custom Search