Java Reference
In-Depth Information
Figure 15-8 . Cell constraints
Figure 15-9 depicts the target grid pane with the grid lines turned on and the Age
label left-aligned horizontally at cell column 0 and cell row 2 .
Figure 15-9 . Target grid pane
15-5. Enhancing the Interface with CSS
Problem
You want to change the Look and Feel of the GUI interface.
Solution
Apply JavaFX's CSS styling to graph nodes. The following code demonstrates using
CSS styling on graph nodes. The code creates five themes: Modena, Caspian, Control
Style 1, Control Style 2, and Sky. Each theme is defined using CSS and affects the
Look and Feel of a dialog box. Following the code, you can see the two different rendi-
tions of the dialog box:
package org.java8recipes.chapter15.recipe15_05;
 
 
Search WWH ::




Custom Search