Category "javafx"

JavaFX - Making a post request using org.apache.httpcomponents fails

When making a post request to my backend, I get the following error. I can't really find a fix online and am very new to Java. Here is the error: Caused by: jav

How to dynamically resize an svg in javafx according to the size of the region

I'm keen on svg and would like to put many of them in my User Interface. But I have a problem with the size of svg. I would like to load any svg I retrieve as a

Converting from Swing to JavaFX? (Migration Guide)

When converting a Swing project to a JavaFx project, which classes from JavaFx match up to the Swing classes? A 1-1 matchup is best. I am not looking for inte

JavaFX: check whether a text property is blank (and not just empty)

I want to have a button enabled or disabled based on whether a text field contains anything, and I want to implement this by using property binding. So at fir

Unable to run javafx project

I am getting the following error when I run the main file in the Javafx project: C:\Users\monu\OneDrive\Documents\jdk-11.0.10\bin\java.exe --module-path C:\D-d

Styling and organizing nodes inside a scene

I want to do the following things: Organize my JavaFX code's nodes Increase the size of my combo boxes a little bit Change the scene background's color. My c

How do I see if a specific CheckBox is selected within a GridPane?

I've created a 10x10 GridPane of CheckBoxes. I need to see whether a specific CheckBox is selected, but the GridPane is made up of nodes. So If I access a parti

"Graphics Device initialization failed for : d3d, sw" for JavaFX on IntelliJ IDEA Windows

While trying to run a simple JavaFX program on IntelliJ IDEA, I kept getting a long line of errors in the console that started with "Graphics Device initializat

Javafx - change Theme (CSS) on active window

I want a Button that allows me to switch between Dark/Light-mode. But I have the problem If I switch, the active windows will not change their Style. First of t

How to lock the divider in SplitPane JavaFX?

I have a SplitPane and I need to divide the layout 25% and 75%. Also, I need to disallow dragging towards right side beyond the 25% split. However I can drag to

How to dynamically change font size in UI to always be the same width in JavaFX?

What I am trying to do is create a label in fxml, using Scenebuilder, which updates its font size to always ensure that the content of the label is the same siz

How to get text from TextArea in JavaFX saving line breaks?

I have a TextArea and a few lines of text in it. When I extract String by getText() method what I`m getting is a line of text instead of really written few line

How to get text from TextArea in JavaFX saving line breaks?

I have a TextArea and a few lines of text in it. When I extract String by getText() method what I`m getting is a line of text instead of really written few line

JavaFX: How to pan a ScrollPane that contains Button children?

In JavaFX, I have a ScrollPane which contains a TilePane which contains various Buttons. This application will run on a touch screen, so the user will scroll b

Can't run a simple demo of a Media class

I found a video on YouTube about using Media class, but when I try to do it - it gives me an error. Could somebody tell me whats wrong? Here's the code, exactly

How to improve performance of JavaFX graphic drawing?

Situation : I've created an app which needs to draw simple rectangles (1x1 - 3x3 size) depends on some variables stored in array of corresponding size (900x900

How do I safely modify JavaFX GUI nodes from my own Thread?

I try to change a JavaFX GUI node in a thread, but I see the following error: Exception in thread "Thread-8" java.lang.IllegalStateException: Not on FX ap

File has been compiled by a more recent version of the Java Runtime error SceneBuilder

I've used JLink + JPackage to build a JavaFX app into a self-contained application. I'm using JDK 14. However, when I try to open one of my FXML files in Intell

java.lang.NullPointerException: Location is required still not working

I have also run into some problems trying to get my JavaFX program to run. Like some of the others, I keep getting an error of java.lang.NullPointerException: L

Adding borders to GridPane JavaFX

I am creating a board game in JavaFX using GridPane. There are 7 different animations which could be placed in each grid (cell) of the grid. Initially the gri