r/JavaFX • u/WebFXProject • Nov 19 '25
Showcase WebFX now supports TeaVM: bringing WebAssembly and Kotlin to JavaFX on the Web!
r/JavaFX • u/WebFXProject • Nov 19 '25
r/JavaFX • u/amine_habchi_ • Nov 18 '25
r/JavaFX • • Nov 18 '25
The author Y Daniel Liang never taught about canvas. We only taught about Pane in his textbook. And I find it heavily difficult to draw via Panes. And I cannot seem to find a way to draw via Canvas online. It is so much of gibberish (probably because my preriquisites on something(which I do not know what thing) might be missing)
r/JavaFX • u/CheekieBreek • Nov 13 '25

There are no download links, dropdowns are empty and a bunch of jquery errors in browser console.
Why is it so hard for modern developers to just put a download link instead of building a chain of seven frameworks hosted on eight domains.
I have tried multiple browsers, toggled extensions and changed network configuration, but GluonHQ knows better, it is absolutely impossible to provide a download link without using jQuery which is apparently UNDEFINED and ERR_TIMED_OUT.
Wait, what is this https://jdk.java.net/javafx25/ ? It has direct download link, and even though for me it doesn't work as it is, I've found it in Web Archive and finally got my JavaFX. Not the version I needed, but at least it's something.
I will leave it here if you don't mind. Maybe someone else will have the same struggle. Do you happen to know any other download options? I think I've seen something JavaFX-related in `apt` package manager. I wonder how does it work.
r/JavaFX • u/gepapado • Nov 10 '25
Virtualized containers like ListView, TableView and TreeTableView contain a .scrollTo(int) method.
The javadoc claims that it
Scrolls the TreeTableView such that the item in the given index is visible to the end user.
The observed behavior, however, is that the container scrolls such that the target index lands specifically at the top of the viewport, not simply within it.
I (naively?) expected that calling .scrollTo(int)when the item is already (completely) within the viewport would not cause any scrolling to take place.
I dug through the source code a bit and it turns out that calling this method specifically fires a SCROLL_TO_TOP_INDEX event to the control itself, which in turn gets handled by the VirtualContainerBase parent of the skin. Naturally, the handler calls the VirtualFlow.scrollToTop(int index) , which
Adjusts the cells such that the cell in the given index will be fully visible in the viewport, and positioned at the very top of the viewport.
This is very confusing and smells like a bug. Am I missing something?
Here is a minimal working example of what I'm describing. To run:
java --module-path=$PATH_TO_FX --add-modules javafx.controls ScrollToDemo.java
import module java.base;
import module javafx.controls;
public class ScrollToDemo extends Application {
@Override
public void start(Stage stage) {
// Make items large enough so that it does not fit in viewport.
var items = IntStream.range(0, 100).boxed().toList();
var lv = new ListView<>(FXCollections.observableArrayList(items));
stage.setScene(new Scene(lv, 640, 480));
stage.show();
// Before: lv starts scrolled to top. items.get(1) is already visible.
lv.scrollTo(1);
// After: lv scrolls so that items.get(1) is at the top of the viewport.
// items.get(0) is no longer visible.
}
public static void main() {
launch();
}
}r/JavaFX • u/nekuronomiikon • Nov 10 '25
hi, normally i dont post on reddit but i genuinely cannot find a remedy for this issue.
so, im working on a project in JavaFX, and connecting it to SceneBuilder. I've been following BroCodes tutorial on how it works on Eclipse. (https://youtu.be/9XJicRt_FaI) All the imports used in the video work EXCEPT "import.javafx.fxml.FXMLLoader". I've reinstalled OpenSDK, reinstalled e(fx)clipse, and I cannot seem to find a solution for this. I'm using Java25 if that helps at all.


r/JavaFX • u/Nareeeek • Nov 09 '25
This is the source code:
protected BorderPane createMonthYearPane() {
BorderPane monthYearPane = new BorderPane();
monthYearPane.getStyleClass().add("month-year-pane");
// Month spinner
HBox monthSpinner = new HBox();
monthSpinner.getStyleClass().add("spinner");
backMonthButton = new Button();
backMonthButton.getStyleClass().add("left-button");
forwardMonthButton = new Button();
forwardMonthButton.getStyleClass().add("right-button");
StackPane leftMonthArrow = new StackPane();
leftMonthArrow.getStyleClass().add("left-arrow");
leftMonthArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
backMonthButton.setGraphic(leftMonthArrow);
StackPane rightMonthArrow = new StackPane();
rightMonthArrow.getStyleClass().add("right-arrow");
rightMonthArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
forwardMonthButton.setGraphic(rightMonthArrow);
backMonthButton.setOnAction(t -> {
forward(-1, MONTHS, false);
});
monthLabel = new Label();
monthLabel.getStyleClass().add("spinner-label");
monthLabel.fontProperty().addListener((o, ov, nv) -> {
updateMonthLabelWidth();
});
forwardMonthButton.setOnAction(t -> {
forward(1, MONTHS, false);
});
monthSpinner.getChildren().addAll(backMonthButton, monthLabel, forwardMonthButton);
monthYearPane.setLeft(monthSpinner);
// Year spinner
HBox yearSpinner = new HBox();
yearSpinner.getStyleClass().add("spinner");
backYearButton = new Button();
backYearButton.getStyleClass().add("left-button");
forwardYearButton = new Button();
forwardYearButton.getStyleClass().add("right-button");
StackPane leftYearArrow = new StackPane();
leftYearArrow.getStyleClass().add("left-arrow");
leftYearArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
backYearButton.setGraphic(leftYearArrow);
StackPane rightYearArrow = new StackPane();
rightYearArrow.getStyleClass().add("right-arrow");
rightYearArrow.setMaxSize(USE_PREF_SIZE, USE_PREF_SIZE);
forwardYearButton.setGraphic(rightYearArrow);
backYearButton.setOnAction(t -> {
forward(-1, YEARS, false);
});
yearLabel = new Label();
yearLabel.getStyleClass().add("spinner-label");
forwardYearButton.setOnAction(t -> {
forward(1, YEARS, false);
});
yearSpinner.getChildren().addAll(backYearButton, yearLabel, forwardYearButton);
yearSpinner.setFillHeight(false);
monthYearPane.setRight(yearSpinner);
return monthYearPane;
}
I have been playing around with this and can only target both of the spinners together, is there a way to target each spinner separately?
r/JavaFX • u/Infinite_Coffee50505 • Nov 08 '25
Hi, so I tried many things including with ChatGPT or whatver. But cant figure out how to make Button.setText() work without that:
java.lang.NullPointerException: Cannot invoke "javafx.scene.control.Button.setText(String)" because "this.recommended_folder" is null. And yes I assigned recommended_folder to the proper button in the fxml page. I want when the response is ready the Button's text to be updated automaticly and not manual.
I looked about other guys with simillar issues but none helped.
/FXML
public Button recommended_folder;Heres part of my code:
public void UploadFile(ActionEvent event) throws Exception {
ExecutorService service = Executors.
newSingleThreadExecutor
();
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Choose a file");
Stage stage = new Stage();
File file = fileChooser.showOpenDialog(stage);
Task<String> task1 = new Task<>() {
u/Override
protected String call() throws Exception {
folder = ModelService.
call
(new String[]{"Images", "Photos", "Videos", "Icons", "Other"}, file);
System.
out
.println(folder);
System.
out
.println(folder);
System.
out
.println(folder);
return folder;
}
};
task1.setOnSucceeded((evnt) -> {
UserService.
setTempFolder
(folder);
try {
JSONControl.
json_saver
(UserService.
getData1
());
OpenUploaded();
recommended_folder.setText(UserService.getData1().tempFolder);
// OpenUploaded();
} catch (Exception e) {
System.
out
.println(e);
}
});
service.submit(task1);
}r/JavaFX • u/Equivalent-Bid-5367 • Nov 04 '25
Created a JavaFX app using Java 21 and copied this tutorial to build my project
https://www.youtube.com/watch?v=udigo_qSp_k
I then created my project, and everything ran fine in an IDE. When trying to upload to GitHub, I wanted to create a release, and followed this tutorial to compile
https://www.youtube.com/watch?v=kQaE2HlFeWY
Double-clicking the jar does nothing. Java -jar jar.jar comes out with this error
Error: JavaFX runtime components are missing, and are required to run this application
I have tried searching the internet, as well as other YouTube tutorials and ChatGPT, but nothing has helped me. In fact, I think ChatGPT corrupted a file path, but that's a separate issue.
r/JavaFX • u/Fancy_Entertainer486 • Nov 03 '25
I’m using Maven with the javafx-maven-plugin to test and package my application with “javafx:jlink”. I’m running into issues exposing my Maven project properties to the app itself, so I can display metadata at runtime, like app version, author and whatnot.
This is an app for me privately. In our company we only do jars and usually we’ll have Maven add project metadata to the manifest file. This doesn’t seem to work with jlink as I think only class files in accordance to the module-info are bundled in.
Also using properties files and resolving placeholders with maven properties doesn’t seem to work, as jlink doesn’t seem to package those, so I end up with the placeholder being displayed like “${project.version}”.
I would like to avoid re-defining metadata in my classes just to display them as this would be annoying on every release.
What’s the best approach to resolve this?
r/JavaFX • u/travelking_brand • Oct 31 '25
I have programmed professionally in possibly dozens of languages, building business applications.
I have started a journey to learn JavaFX and have been having fun, but I have come across a conundrum. Does JavaFX NOT have an OOTB control for entering a decimal value??? This kind of blows my mind. All I see are rather convoluted methods for formatting a TextField.
All of the higher-level programming languages I have ever used for business applications have had an easy method to input decimal values OOTB. Have I missed a key fact???
r/JavaFX • u/sunnykentz • Oct 30 '25
Neutron is the same as electron but for Java
r/JavaFX • u/Striking_Creme864 • Oct 23 '25
For our TabShell project we need a tab-based docking system. We built it using another of our projects - TabPanePro, which powers all tabs, including those in side panels.
Some key features include:
This is how it looks:
Just wanted to share, maybe someone will find it interesting.
r/JavaFX • u/cat-edelveis • Oct 23 '25
JavaFX testing may seem non-trivial in the beginning, especially considering how few guidelines and tutorials there are on this matter. In this video, I summarized the most common JavaFX testing mistakes and ways to avoid them.
r/JavaFX • u/Realistic-Way8547 • Oct 23 '25
Hi There,
I have a very old project idea that I finally started with JavaFX. The goal will be to create a WYSIWYG editor where the users can drop pre defined templates to quickly fill the document. Users would be able to define their own styles for the documents, export as pdf and print.
Because of the need to style the document and the initial attempts that I made with Electron, I started to build it around a WebView displaying an HTML document. I am able to drop templates and edit the content of this document. That was fun to build and I'm quite happy with the result.
However, export and print are much more tricky. I do not want to fall into implementing my own conversion engine but I cannot find a good solution to export my (HTML) document as PDF and print it with fidelity.
While it was fun and "easy" to do, I am wondering if the WebView is a good choice. Since I do not have a lot of experience with JavaFX I would like to ask this community: What techniques will you choose to implement those requirements ?
r/JavaFX • u/Birdasaur • Oct 22 '25
Major feature release for Trinity XAI tool. New upgrades providing a series of statistical analysis tools:
r/JavaFX • u/SandwichNo4142 • Oct 19 '25
For very long time I had issues to render synthetically created graphics in javaFX pixel perfect when the scaling factor is 125%.
Now I thought, I would have a way to go directly to the GNode's Graphic object and write there a texture directly to it.
Sad to say, the texture seems to map only the virtual pixels and not the real physical pixels.
This is sad, because even the old swing framework had an approach to do so.
Has anybody found out a way to determine the physical pixels of a component?
r/JavaFX • u/milchshakee • Oct 16 '25
Hello there, over the last few months I have been working on putting all the things I learned and improved over the years developing JavaFX applications into a ready-to-use template called KickstartFX. You can clone it and get started instantly or try out the pre-built releases on GitHub. The code and buildscripts are the same you find in a real-world producation application as most of them are taken straight from one, in this case XPipe.
Now in this subreddit I have seen a variety of posts trying to reinvent the simple build process of taking JavaFX code and producing native intallers and executables using questionable approaches and build tools. KickstartFX accomplishes this with a standard gradle build without forcing you to depend on some third-party distribution tool.
To summarize, it features the following features that you won't find in other templates:
So as you can see, this is not a basic template but instead a full application, just missing your custom application content to be plugged in. You can of course also customize any part of the codebase, the idea is to fork the repository, not depend on it using a library.
The licensing model is designed to allow open source projects to use it under an Apache 2.0 license and other proprietary forks to contact me for licensing. Essentially, the base license for everyone is GPL3, but you can contact me to get the permission to license it under the Apache 2.0 license. The only thing you need to show for that is that you are developing your application in an open source repository. If you are a company, developing a closed-source application, and want to license it under something else than GPL3, you can also contact me for an offer.
Here are some screenshots of KickstartFX with the AtlantaFX sampler and some applications that are based on it:




r/JavaFX • u/sunnykentz • Oct 15 '25
We can complain as much as we want, but html/css/js is the best way to make ui these days.
A guy on x made a "electron" but for java, and it's funny now that I think of it. JavaScript -> electron Golang -> wails Rust -> tauri
All these are production ready frameworks but java does not have one yet...
r/JavaFX • u/DirectionFrequent455 • Oct 07 '25
Hi,
I recently released a JavaFX plugin for JeKa to simplify the process of building JavaFX applications into runnable, downloadable distributions. Compared to Maven or traditional tools, this solution eliminates several pain points:
All you need is a Git repository!
Check out a port of dev-tools using Jeka, a JavaFX application originally built with Maven: https://github.com/djeang/devtools
r/JavaFX • u/sunnykentz • Oct 07 '25
So, in my days in university I had to implement a visualisation of sorting algorithms. Which I chose JavaFX to do it with.
My problem is, I was mainly a flutter dev and everything in flutter has amazing templates. But JavaFX 🤣 I was left alone.
So after I created a build tool for java and kotlin I decided to add a template to Freya JavaFX app. A simple one.
r/JavaFX • u/BlueGoliath • Oct 07 '25
r/JavaFX • u/I_4m_knight • Oct 05 '25
Hi guys,
I'm working on a project which is in javafx and it has crossed about 100k lines with ui, logic etc I've divided it in four independent modules and now it's really getting out of hand for single dev like I can manage it but still I want to know how you people handle large projects or what are your suggestions.
Intellij ultimate is my go to and favorite Ide i use. And for llm model i mostly keep my companion sonnet 4 and now 4.5 as the other llm starts giving me false positives and start hallucinating as files are large but the code is mostly nodules and with full solid pricipal but still it's really complicated it's enterprise grade product which I'm developing for my self. Like still it only 60-70% completed yet or less and have to work more on it to complete it. I sometimes think that I'm complicating something that could be done with some simple cli.
r/JavaFX • u/Draaksward_89 • Oct 05 '25
Workshopping an idea, which basically follows how youtube displays its list of videos to watch - tiles/posters in a classical cols -> rows filling (my brain is not up to the task of proper wording today). And focusing on the questions I don't know how to approach.
My first idea was to use GridPane, but I wanted for it to adjust to the window/screen size, moving the items, which can't fit in the current row to the following one.
Wrapped it inside a ScrollPane to have the vertical scroll.
But now I am looking into the question of mouse hover, and possible navigation using arrow keys (for those android/air remotes).
---
My current approach at the question of hover is basically `tilePane.getChildren().stream().filter(Node::isHover)`, which basically forwards the call to the relevant custom VBox node (until I find something better).
And a second call with the `filter(item -> !item.isHover())` to remove the hover state from the previous element.
Question: is there a better (and easier way) to do this? I feel like I'm inventing the wheel here.
---
And here comes the second part of the puzzle.
I basically have
1 2 [3]
4 5
structure display on the pane. I currently have selected the element [3] (the game of using navigation keys will be a separate thing, but still).
And now I want to press "down", and move to the element '5'.
For what I see, the node element has `getLayoutX\Y`. Which gives me a possibility to get the current positioning (still need to understand if it work well with scrolling). And, again, following the previous `getChildren`, filter out the closest (the example specifically didn't have element '6') element, and move to it.
Question: basically, the same as the previous one.