Programming Examples

Are you a Programmer or Application Developer or a DBA? Take a cup of coffee, sit back and spend few minutes here :)

Tag Archive for ‘getResource’

JavaFx CSS Style Example

Fig 1. About JavaFx CSS Example

In JavaFx, we can apply CSS style to the nodes. For example, if we want to define a style for the buttons, the style sheet will have the selector named as ‘.button’. The same way, TextField defines a UI class in JavaFx, and the selector will be named as ‘.text-field’. Note, as text field control is a two-word class, in the selector we will have a hyphen. When defining the rules, we must prefix each rule with ‘-fx-‘. In this example, we will define style rule for a JavaFx Button.

Continue Reading →