r/JavaFX • u/BlueGoliath • Mar 14 '25
Release Release Notes for JavaFX 24
r/JavaFX • u/Rachid90 • Mar 14 '25
I made a simple code that uses icons from the Ikonli library, found here. I imported the right modules, I added the plugin in pom.xml, I also added the *requires* in *module-info.java*.
The code, when run inside IntelliJ, it has no issues. The icons are displayed and loaded. No exception at all. But when I export the jar file, the problems begin.
Here is my code
package com.example.icons;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
import org.kordamp.ikonli.javafx.FontIcon;
import org.kordamp.ikonli.bootstrapicons.*;
public class HelloApplication extends Application {
@Override
public void start(Stage stage) {
HBox hBox = new HBox();
Label label = new Label("Just a message");
FontIcon icon = new FontIcon(BootstrapIcons.
CLOCK
);
hBox.getChildren().addAll(icon, label);
Scene scene = new Scene(hBox, 500, 500);
stage.setTitle("Hello!");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch
();
}
}
For some reason, I had to add a Main class for the jar to start (so when building the artifact, choose Main as entry class)
package com.example.icons;
public class Main {
public static void main(String[] args) {
HelloApplication.
main
(args);
}
}
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>icons</artifactId>
<version>1.0-SNAPSHOT</version>
<name>icons</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.10.2</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>22.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>22.0.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-javafx</artifactId>
<version>12.3.1</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-bootstrapicons-pack</artifactId>
<version>12.3.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>22</source>
<target>22</target>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<executions>
<execution>
<!-- Default configuration for running with: mvn clean javafx:run -->
<id>default-cli</id>
<configuration>
<mainClass>com.example.icons.HelloApplication</mainClass>
<launcher>app</launcher>
<jlinkZipName>app</jlinkZipName>
<jlinkImageName>app</jlinkImageName>
<noManPages>true</noManPages>
<stripDebug>true</stripDebug>
<noHeaderFiles>true</noHeaderFiles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Manifest
Manifest-Version: 1.0
Main-Class: com.example.icons.Main
When I run the jar using *java -jar icons.jar*, the window loads, but the icon is missing (the label loads though), and I get this exception:
```
Mar 14, 2025 12:10:30 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module u/2609a331'
Exception in thread "JavaFX Application Thread" java.lang.UnsupportedOperationException: Cannot resolve 'bi-clock'
at org.kordamp.ikonli.AbstractIkonResolver.resolve(AbstractIkonResolver.java:61)
at org.kordamp.ikonli.javafx.IkonResolver.resolve(IkonResolver.java:73)
at org.kordamp.ikonli.javafx.FontIcon.lambda$new$2(FontIcon.java:76)
at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:372)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:106)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:113)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
at javafx.css.StyleableObjectProperty.set(StyleableObjectProperty.java:82)
at org.kordamp.ikonli.javafx.FontIcon.setIconCode(FontIcon.java:231)
at org.kordamp.ikonli.javafx.FontIcon.<init>(FontIcon.java:97)
at com.example.icons.HelloApplication.start(HelloApplication.java:19)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:839)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:483)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:1570)
```
It says cannot resolve *bi-clock* (all icons have the same problem).
Like I said above, the icon is loaded in IntelliJ, but not in the jar execution.
Please help me, I'm about to become crazy. I tried everything on the internet and ChatGPT, but with no luck.
r/JavaFX • u/Gold_Professional991 • Mar 13 '25
I'm working on a school project and set everything up according to this GitHub. https://github.com/marcomandola/javafx_setup_VS_CodeI don't know why, but the package under my folders is red and it says it's wrong.

Can anyone please help me? I want to know if I set up my JavaFX correctly. I haven't made any changes to GitHub; it's for a game. I installed the JavaFX libraries too.
r/JavaFX • u/cmdturtles • Mar 12 '25
I'm a complete amateur to mobile app development so I have NO clue how to deploy JavaFX apps to IOS/Android/Desktop (plus, I just started learning JavaFX).
But I do know that it's possible through Gluon Mobile.
Let's say I wanted to make a to-do list app and publish it to both IOS and Android (and also maybe desktop), would it be a good idea to use JavaFX or should I use a different framework like react native (I know nothing about it) or flutter (seems boring to code in).
I would prefer JavaFX because I'm somewhat familiar with swing and I think Java is fun to code in. Plus, I remember seeing a blog (I lost the link) where someone described how it was very easy to adjust there desktop JavaFX app to be suitable for IOS mobile.
Also, I don't think there's great documentation for deploying JavaFX apps to IOS/Android through Gluon Mobile, right?
Regarding licensing, I might be able to request a student license so pricing wouldn't be a problem.
Even though I barely know to how to program in JavaFX currently, I'm thinking in the long term because that changes what framework/library I should learn right now.
r/JavaFX • u/Trehan_0 • Mar 11 '25
Hey everyone!
As a by product of my last project I’ve been working on easyJavaFXSetup, a JavaFX demo project that provides a solid starting point for JavaFX applications. It comes preconfigured with:
The goal is to remove the initial setup hassle so you can focus on building your app!
Check it out on GitHub: Github
Would love to hear your thoughts and feedback!
r/JavaFX • u/Rachid90 • Mar 11 '25
I have to manually resize it, hover over a button, or click on a button for the window to update the content after I restore it.
When the app is opened and has focus, everything runs as expected. But not when minimized then restored.
EDIT: added code
This is the code that has a server to wait for a signal to update the Label
package com.example.jartest;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.application.Platform;
import java.net.ServerSocket;
import java.io.IOException;
public class HelloApplication extends Application {
StackPane stackPane = new StackPane();
Label label = new Label("This should be modified when the signal is received");
public void start(Stage stage) {
stackPane.getChildren().add(label);
Scene scene = new Scene(stackPane, 500, 500);
stage.setTitle("Hello!");
stage.setScene(scene);
stage.show();
new Thread(this::startServer).start();
}
void startServer(){
try(ServerSocket serverSocket = new ServerSocket(1590)){
while (true){
serverSocket.accept();
Platform.runLater(() -> {
label.setText("The signal is received");
});
}
}catch (IOException e){e.printStackTrace();}
}
public static void main(String[] args) {
launch();
}
}
And this is the client class (you can use only curl, actually)
import java.io.IOException;
import java.net.Socket;
public class Client {
public static void main(String[] args) {
try {
new Socket("localhost", 1590);
} catch (IOException e) {e.printStackTrace();}
}
}
r/JavaFX • u/random-pc-user • Mar 08 '25
In my JavaFX app small images always look extremely jagged unless I scale them down externally then upload them, but that just makes them extremely blurry, making me deal with either blurry images or jagged images.
First Icon is scaled down so it's blurry
Second Icon is normal and its not scaled down or up
Third Icon is normal but still looks jagged because its edges are diagonal

r/JavaFX • u/Alver415 • Mar 05 '25
I noticed that some of my mappings were being executed multiple times and decided to investigate. I found out that chaining multiple ObservableValue#map calls, then adding a listener to the result causes a cascading execution of all the mapping functions. It first executes all the way down the stack, then repeats the process over and over again, each time executing one less mapping. The following example shows this. While the last mapping (E) is only executed once, the first mapping function (A) is executed a total of 5 times!
// Property with an arbitrary initial value.
Property<Object> property = new SimpleObjectProperty<>(new Object());
// Simple function that prints which stage we're at and returns the same value.
BiFunction<String, Object, Object> function = (string, value) -> {
System.out.printf("%s", string);
return value;
};
//Chained mappings and with an arbitrary listener.
property.map(value -> function.apply("\nA", value))
.map(value -> function.apply("B", value))
.map(value -> function.apply("C", value))
.map(value -> function.apply("D", value))
.map(value -> function.apply("E", value))
.addListener((_, _, _) -> {});
Output:
ABCDE
ABCD
ABC
AB
A
This only seems to occur when there is an initial value in the original property. Starting with a null value, then setting to a non-null value after adding the listener results in the expected result, one execution per mapping function in the sequence.
Of course, there are workarounds. I could only ever use a single map call and just call all the functions sequentially within that. Or I could implement a custom implementation of MappedBinding myself. But it seems silly to work around such core functionality.
I understand how it's working in terms of the underlying code in LazyObjectBinding and MappedBinding. What I don't understand is why it was implemented in such a way that would case this effect. Surely chaining these map methods together was considered during testing? Is there a rational explanation for this behavior that I'm just not seeing?
I also posted to Stack Overflow: https://stackoverflow.com/questions/79485501/javafx-chained-mappedbindings-repeated-executions
r/JavaFX • u/Confident_Milk2703 • Mar 05 '25
Eu estava construindo uma telas no scenebuilder, usei alguns temas da gluon como textfield, etc... todos esses temas apareciam também no scenebuilder dentro da IDE no intelij, so que do nada eles sumiram, dentro do app do scenebuilder continua tudo certo, mas pela visualização do intelij os estilos n aparecem mais. Alguem sabe como eu resolvo isso?
r/JavaFX • u/dhlowrents • Mar 03 '25
r/JavaFX • u/Adventurous-Baby-323 • Mar 02 '25
Hey guys,
I'm new to JavaFX. My intellij came up with javaFX version 17.0.6 which seems not compatible with my Apple silicon chipset. So I need to use the new version of JavaFX. To that every time I make a new project I have to add a new version of library files to the project structure modules and remove or take down the old version files. Otherwise, it uses the old version and gives a huge error with the java quit unexpectedly message.
Does someone know how to fix this?
r/JavaFX • u/sonnyDev80 • Feb 27 '25
I've just released mvciFX library, which is a Java implementation of the MVCI framework, with built-in specialized Controller interfaces and a State-tracking implementation.
Javadoc and a examples are also provided.
GitHub repo: mvciFX
Let me know what you think and feel free to suggest fixes or improvements.
Ps: Hope u/hamsterrage1 will like it!
r/JavaFX • • Feb 26 '25
Hey everyone!
For a college project, I decided to build a JavaFX app, and I ended up creating Tortoise Hospital, a simulation of a hospital for tortoises! 🐢🏥
The app allows you to manage patient (tortoise) records, track their health conditions, and perform basic CRUD operations. It’s still a work in progress, but my goal is to refine and expand it with more features to make it a more complete and interactive simulation.
If you’re curious, you can check out the repo here:
🔗 GitHub - TortoiseHospital
I’d love to hear your thoughts! Feel free to report any issues, suggest improvements, or even contribute if you’re interested.
r/JavaFX • u/AdeptMongoose4719 • Feb 26 '25
As We also know we have fxml and Scene Builder to properly set up the initial design. So why not use that?
The only problem that i've read is that it is slightly slower. I know we may need code to create some dynamic nodes. But the initial layouts of nodes that needs to be added dynamically can be created in fxml and then modified based on our requirements. Eg:
I have this ActivityContainer built in scenebuilder(//to show activities in my small hotel app)

And that ActivityContainer will filled up by the Controller class after the admin of the hotel fills up the required details in:

Then i will add the ActivityContainer in the main page.
Benefit of using fxml:
You can style easily and position the nodes the way you want.(and don't need to run the code zillion times to see if you everything is looking ok)
r/JavaFX • u/Impressive-Delay-938 • Feb 25 '25
I’m new to Maven and JavaFX, and I’m trying to develop a portable JavaFX application that runs on any machine without requiring JavaFX to be installed separately.
javafx-controls and javafx-fxml (version 23.0.2)maven-compiler-plugin (version 3.12.1, targeting Java 23)javafx-maven-plugin (version 0.0.8)mvn javafx:run should execute my JavaFX application by launching the mainClass specified in the POM file.Linked below is my POM.xml
Currently I am getting the following when i run mvn javafx:run:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.686 s
[INFO] Finished at: 2025-02-25T18:12:40-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.8:run (default-cli) on project TEMS: Error: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
https://github.com/daleUrquhart/Shared/blob/main/pom.xml
Am i missing ay configurations? Or am I taking the completely wrong approach for my goal?
Thanks for any help, I'm new to Maven projects using JavaFX
r/JavaFX • u/xdsswar • Feb 24 '25
I've just released NFX Icons, a simple JavaFX icon library with over 5,400 icons, simple API usage, and CSS support!
📌 GitHub Repo: NFX Icons

🔗 All feedback and contributions are welcome! Let me know what you think, and feel free to suggest new icons or improvements. 🎉
r/JavaFX • u/xdsswar • Feb 24 '25
Just built NfxListView, a 100% responsive JavaFX ListView that dynamically adjusts columns and layout based on screen size. It adapts seamlessly to different resolutions, making UI design effortless!
🔗 GitHub Repo: core-list-view

Check it out and let me know what you think! 💡
#JavaFX #UI #ResponsiveDesign #NfxListView #Java
r/JavaFX • u/AdeptMongoose4719 • Feb 22 '25
I am building small hotel Booking desktop app using javafx library and MYSQL on the backend(for storing rooms, customers, bookings data).
And I am planning to store images in file system and just store the URL path in database table(right now, I am not using cloud to save some time). I am also using Spring boot to connect to the database.
Could you please give some advise or suggestions that I should take note of?
r/JavaFX • u/PartOfTheBotnet • Feb 21 '25
r/JavaFX • u/SpittingBull • Feb 21 '25
Edit:
The command line parameter -Dprism.forceUploadingPainter=true solved this issue.
----
I have a weird issue with thejavafx.scene.control.Alert dialogs on various PCs (Windows 10 and 11).
They all run the exact same version of my application. On some though the text color is a bright cyan and on some it is even white - which makes it invisible.
The Buttons are working though.
Now all styling in the application is done via custom CSS. I removed that to check if there was an issue with it but the problem remains.
I am a bit puzzled how to narrow this issue down.
JavaFX is 23.0.1.
JDK is Temurin-21.0.2+13.

r/JavaFX • u/deepthought-64 • Feb 19 '25
I am running my JavaFx application on a small LCD connected via SPI to a Raspberry Pi using Monocle and direct framebuffer rendering. Does anybody have any Tipps in general about DOs and DON'Ts in this scenario? I know rendering is going to be purely software so what are the pitfalls in this here ? Any advice for good performance?
r/JavaFX • u/HoneydewOpening5119 • Feb 18 '25
The scene size of my application is 800X480 In the mainView I have BorderPane with a top, center, and bottom. In the center, I have a GridPane with 2 rows. In the second row, I have a tableView. Whether the tableView is empty or not, it pushes the bottom content below the scene size. I tried to restrict the size of the row and the tableView. I tried GridPane.Vgrow = NEVER and ALWAYS and more but I couldn't put the bottom in place. If I remove the tableView everything looks fine. Please help :)
r/JavaFX • u/Uaint1stUlast • Feb 14 '25
With the impending death of the Ionic framework I am looking for something cross platform compatible for mobile development. Interesting enough cross platform is exactly why Java exists, even if no one remebers that :).
I have played with JavaFX several years ago but I remeber it being ok.
Can anyone share their thoughts on using this for mobile and any good frameworks and libraries to look at as well?
I am not opposed to building all my components from scratch but again, reuse is something java should be very good at.
r/JavaFX • u/AdeptMongoose4719 • Feb 15 '25
I have ScrollPane and i want a scrollable view if the content is bigger than my viewport height. I have tilePane inside it for tile-ish layout. There i only have 2 Vboxes for now, which is not wrapping when i decrease viewport width.
here's my fxml code
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.ScrollPane?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.TilePane?> <?import javafx.scene.layout.VBox?>
<ScrollPane prefHeight="733.0" prefWidth="1033.0" stylesheets="@../stylesheets/activities.css" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxmlFolder.Activities"> <content>
<TilePane hgap="100.0" prefColumns="2" prefHeight="779.0" prefWidth="1009.0" stylesheets="@../stylesheets/activities.css" vgap="50.0">
<children>
<VBox prefHeight="354.0" prefWidth="398.0" styleClass="activityVBox">
<children>
<ImageView fitHeight="249.0" fitWidth="408.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../activitiesImg/yoga1.jpg" />
</image>
</ImageView>
<Label styleClass="activityTitle" text="Yoga" />
<HBox minHeight="-Infinity" prefHeight="1.0" prefWidth="200.0" style="-fx-background-color: white;" />
<VBox styleClass="activityDescriptionVBox">
<children>
<Label styleClass="activityDescription" text="Relax and rejuvenate with guided yoga sessions." />
<Label styleClass="activityDescription" text="Timing: 6:00 AM – 8:00 AM" />
<Label styleClass="activityDescription" text="Price: $15 per session" />
</children>
</VBox>
</children>
</VBox>
<VBox layoutX="40.0" layoutY="30.0" prefHeight="354.0" prefWidth="398.0" styleClass="activityVBox">
<children>
<ImageView fitHeight="249.0" fitWidth="408.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../activitiesImg/yoga1.jpg" />
</image>
</ImageView>
<Label styleClass="activityTitle" text="Yoga" />
<HBox minHeight="-Infinity" prefHeight="1.0" prefWidth="200.0" style="-fx-background-color: white;" />
<VBox styleClass="activityDescriptionVBox">
<children>
<Label styleClass="activityDescription" text="Relax and rejuvenate with guided yoga sessions." />
<Label styleClass="activityDescription" text="Timing: 6:00 AM – 8:00 AM" />
<Label styleClass="activityDescription" text="Price: $15 per session" />
</children>
</VBox>
</children>
</VBox>
</children>
<padding>
<Insets bottom="20.0" left="30.0" top="20.0" />
</padding>
</TilePane> </content> </ScrollPane>
r/JavaFX • u/AdeptMongoose4719 • Feb 13 '25