38,885 questions
1
vote
0
answers
37
views
How to disable antialiasing for 2D drawing operations?
full image
zoomed in
This simple program uses gc.strokeOval() to draw a white circle on a black background (see full image). But closer inspection reveals that something is automatically anti-aliasing ...
8
votes
2
answers
224
views
JavaFX ListView programmatic selection scroll only when item is outside visible range
When selecting items programmatically in a ListView, I want the scroll to behave like native keyboard navigation — scroll only when the selected item is outside the visible area. Using listView....
0
votes
1
answer
81
views
How to get concrete Controller type using Guava [closed]
I am using Google Guava to switch the content pane in my JavaFX app.
@Subscribe
public void handleChangeViewDataModel(ChangeViewEventDataModel event) {
try {
FXMLLoader loader = new ...
Advice
0
votes
17
replies
162
views
Modern websites not working in Java 8 WebView
The Java 8 WebView is too old for nowadays' websites. I've done some research, but nothing works.
JCEF is for Swing. I tried everything to embed it in JavaFX, but nothing works (threading issues, DLL ...
2
votes
0
answers
180
views
High GPU/VRAM usage and UI freezing when dynamically updating FlowPane with ImageViews
I am experiencing significant performance issues and UI freezing in my JavaFX application when navigating through pages of a gallery-style view.
I am running this on an AMD Ryzen with Integrated ...
0
votes
1
answer
108
views
Error running gluonfx:compile produces: $JAVA_HOME and $GRAALVM_HOME are undefined
~/git/repo/fxProject$ sudo mvn gluonfx:compile
[Sun Mar 08 00:00:42 EST 2026][INFO] We will now compile your code for x86_64-linux-linux. This may take some time.
java.io.IOException: Error: $...
0
votes
1
answer
112
views
Multiple Labels in HBox should behave like a single truncated Label (ellipsis only on the last visible one)
I have an HBox containing multiple Label nodes (N labels). Each label must have its own Tooltip, so I cannot merge them into a single Label.
When the HBox becomes too small, each Label applies its own ...
2
votes
1
answer
127
views
Packaging JavaFX application with non-modular dependencies
I'm trying to package a simple web scraper application for installation by non-technical users.
The main issue I'm running into is that I'm using Jsoup and Freemarker, which are non-modular ...
1
vote
1
answer
97
views
ImageView.setRotate let menubar freeze
I'm writing an application, which simulates and demonstrates a compass based on JavaFX 25 / Java 25 and Maven 3.9.12.
This application has a menu bar with some menu items, a compass image (compass.png)...
Best practices
1
vote
5
replies
118
views
JavaFx: Set font size of all labels
I am using Java / JavaFx 17. In my application there are multiple label objects (ca. 25). Instead of setting for all labels individually the font size, I would like to know, if there is any ...
-5
votes
1
answer
134
views
Map Services to anyRunning property [closed]
What is the most concise way to map a collection of JavaFX Services to a property "anyRunning" — true, if at least one of the services is running?
import javafx.beans.binding....
2
votes
3
answers
221
views
Selenium ChromeDriver not working in JavaFX application packaged as an exe
I have a JavaFX application that uses Selenium to scrape some websites. Everything works great when I run the application through IntelliJ. However, I am packaging the final product into an exe file ...
4
votes
0
answers
147
views
How do I reference an event handler from expression in JavaFX?
<Button text="$controller" onAction="$controller.onActionHandler">
<style>
-fx-padding: 10;
-fx-border-style: solid inside;
-fx-border-width: 2;
-fx-...
0
votes
0
answers
56
views
Constant stage size ratio
I’m trying to keep a constant ratio (1:1) on a stage when I’m resizing it.
Here is the code I’m using:
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans....
Best practices
2
votes
6
replies
66
views
Binding to multiple Services
javafx.beans.property.Property#bind seems to "unbind" previous bindings which is not always optimal.
Suppose you have a GUI spinner that is supposed to be visible as long as there is at ...