JavaFX: Progress-Bar CSS Styling

Posted: Mai 29th, 2014 | Filed under: Java | Tags: , , , , , , | 3 Comments »

In my opinion the JavaFX CSS Reference Guide is not well elaborated. With the help of screenshots and concrete examples it would be much easier to understand the explanations. Therefore I started https://github.com/frankred/JavaFX-Tutorials to give you some examples for specific components.

In the following post the progress-bar component is introduced.

Progress-Bar Tutorial

.progress-bar {
    -fx-background-color: yellow;
    -fx-background-radius: 10, 10, 10, 10;

}

.progress-bar .track{
    -fx-background-color: green;
    -fx-background-insets: 20;
    -fx-background-radius: 6, 6, 6, 6;
}

.progress-bar .bar { 
    -fx-background-color: grey;
    -fx-background-insets: 30, 30, 30, 30; 
    -fx-background-radius: 4, 4, 4, 4;
}

Feel free to copy and paste everything!