If I use intellij idea, is there any easy way to visually edit the fxml file?
Yes, IntelliJ IDEA provides excellent support for visually editing FXML files through integration with JavaFX Scene Builder. Here's how to set it up and use it:
Install Scene Builder: First, you need to download and install JavaFX Scene Builder from Gluon:
Configure Scene Builder Path:
C:\Program Files\SceneBuilder\SceneBuilder.exe on Windows or /Applications/SceneBuilder.app on macOS)Once configured, you can visually edit FXML files in two ways:

Scene Builder provides a drag-and-drop interface for designing JavaFX UIs:
You can:
When you save changes in Scene Builder, the FXML file in IntelliJ is automatically updated. You can switch between:
For your dark-themed JavaFX project:
Custom CSS: In Scene Builder, you can apply your custom CSS file:
dark-theme.css fileFontAwesome Icons: To preview FontAwesome icons in Scene Builder:
If you encounter issues with Scene Builder integration:
Scene Builder makes designing JavaFX UIs much more intuitive and can significantly speed up your UI development process!
I don't have any fonts in the fonts folder, do I need to do anything?
You're right to notice that the fonts folder is empty. Here's what you need to know:
If you want to use custom fonts in your application, here's how:
src/main/resources/com/darkfxui/fonts/ directory.dark-theme.css):@font-face {
font-family: 'MyCustomFont';
src: url('../fonts/my-custom-font.ttf');
}
/* Then use it */
.some-element {
-fx-font-family: 'MyCustomFont';
}Font customFont = Font.loadFont(
getClass().getResourceAsStream("/com/darkfxui/fonts/my-custom-font.ttf"),
14
);The application currently uses the system font 'Segoe UI' with a fallback to sans-serif, as defined in the CSS:
.root {
-fx-font-family: 'Segoe UI', sans-serif;
-fx-font-size: 14px;
/* ... */
}This will use the system's Segoe UI font if available (common on Windows) or fall back to the default sans-serif font.
If you want to enhance your dark UI with custom fonts, consider:
To add these, download the font files and place them in your fonts directory, then update your CSS to use them.
@font-face {
font-family: 'Roboto';
src: url('../fonts/Roboto-Regular.ttf');
}
@font-face {
font-family: 'Roboto';
src: url('../fonts/Roboto-Bold.ttf');
font-weight: bold;
}
.root {
-fx-font-family: 'Roboto', sans-serif;
/* ... */
}Remember that adding custom fonts increases your application size, so use them judiciously.
does ikonli support the duotone fonts from fontawesome?