Skip to main content

Themes, Custom Fonts, Backgrounds and Borders, Responsive Styling and Dark Mode

Learn Themes, Custom Fonts, Backgrounds and Borders, Responsive Styling and Dark Mode (Phase 7 · CSS and Styling (Core), JavaFX) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Themes, backgrounds and borders • Built-in themes : Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA) (default) or STYLESHEET_CASPIAN ; JavaFX 22+ adds Platform.Preferences colour scheme detection. Third-party themes: AtlantaFX, JMetro, BootstrapFX, MaterialFX. Backgrounds : -fx-background-color (multiple colours, linear-gradient(...) , radial-gradient ), -fx-background-image , -fx-background-radius , -fx-background-insets . Borders : -fx-border-color , -fx-border-width , -fx-border-radius , -fx-border-style ; effects: -fx-effect: dropshadow(...) . In Java: Background / Border...

More lessons in Phase 7 · CSS and Styling (Core)