I have a script build.gradle, which created the IDEA development environment when creating a JavaFX project with Gradle support: After the “build” task is completed, the “distributions” folder appears in the build folder. It contains a zip archive with the following contents: The bin folder contains two scripts, sh and bat. The lib folder contains, as I understand it, all
Tag: javafx
JavaFx: CSS element unable to inherit properties of it’s ID
I have created an Options menu with JavaFx and styled it with CSS. I have used FXML for designing the options window. In the options window, I have created a label at the top and given it ID “title”. Following is my FXML code and CSS code: FXML for Label: The problem with my output is that the label should
How to create a JavaFX project within another project and open it in IntelliJ
I wanna add JavaFX to an existing project in IntelliJ and followed this documentation. I created a folder structure with an folder with an JavaFX project in it. If I open only this folder who contains JavaFX within IntelliJ everything gets imported correctly and the sample main is running. If I open the whole project where the folder with JavaFX
RichTextFx VirtualizedScrollPane flickers when text wraps as you type
I have a flickering issue with RichTextFx StyleClassedTextArea and VirtualizedScrollPane. When you wrap text and keep typing, it flickers so much that you are unable to read while you type. This is a stark contrast to the regular TextArea scrolling. It’s more pronounced than the gif above (gif fps doesn’t give it justice). I’m not sure if this is because
How to listen for clicks on dynamically generated buttons in TableCell?
I have a class Task that takes field values from the database and is displayed as a row in the table. There is a controller that fills the rows of the table with objects of the Task class. I need to listen for clicks on buttons in cells. But those buttons are not present as fields in the controller. How
How to access a variable from one class controller file to another in JavaFX?
So I have an integer number called “size” saved to a controller class called SettingsStageController.java and I want that variable to be accessed through my other controller class file called GameStageController.java but I can’t seem to find out how. SettingsStageController.java GameStageController.java Answer If a method needs data to perform its functionality, then that data should be a parameter to the
Openjdk-17.0.2 with javafx in termux
Hello I installed openjdk-17.0.2 In termux and I want to make a javafx application I start finding the sdk of javafx for java 17.0.2 but I got nothing. Can anybody tell how can I install the javafx for the openjdk 17.0.2. Or how can I install java 18.0.1 in termux because there is a option to download javafx sdk for
Created .exe from jpackager crashes
I have a JavaFX Project, which I want to export as a dmg and exe. The export as a dmg file for Mac was no problem. But the export as a .exe file for Windows is not working. I created a jar file and I ran jlink. Then I exported the project with jpackage. Here is the command: On my
Array to ComboBox – JavaFx
I am working on a school project, I am trying to bring an a String array straight into a combo box and am getting an error. Error: java: incompatible types: java.lang.String[] cannot be converted to javafx.collections.ObservableList<java.lang.String> Answer That ComBoBox constructor needs an ObservableList as argument . if you want to add an array of Strings use addAll() method
How to set order for dynamically added JavaFX components?
I have a button that generates another button each time it’s clicked. 1 of the problems is, that the generated button is placed in the wrong location. The buttons should start around the Top Left side of the window, but the location of the buttons is at the bottom left of the window. I can’t use the function setAlignment(Pos.TOP_LEFT) to