The JJArroyo theme must be initialized before components can be properly styled. The library provides a simple static method to apply the theme to your JavaFX Scene.
Theme initialization loads the main stylesheet (jjarroyo-theme.css) which includes all component styles, color variables, and utilities.
If you plan to use modals in your application, you should register a modal container:
import com.jjarroyo.JJArroyo;import javafx.scene.layout.StackPane;public class MyApp extends Application { @Override public void start(Stage primaryStage) { StackPane root = new StackPane(); Scene scene = new Scene(root, 800, 600); // Initialize theme JJArroyo.init(scene); // Register modal container JJArroyo.setModalContainer(root); // Now you can use JModal anywhere in your app primaryStage.setScene(scene); primaryStage.show(); }}
The modal container should be a StackPane that sits at the root of your scene. Modals will be overlaid on top of this container.