i was searching for answer and trying so many options. Finally i found way to pass my own javaxf object to GridPane. But I still think there is a better way to this than I am doing. So here is my code: Main: By better way I mean, that there might be other way than passing GridPane and int x,
Tag: javafx
javafx.fxml.LoadException when trying to display a list of objects in a TableView JavaFX
I am trying to display a list of objects in a JavaFX table but I keep running into a JavaFX exception when looping through the objects to add to the table, does anybody know what might be causing this, I’ve tried several different implementations of ObservableLists but they all see to produce the same r…
Java project can display a new scene pretty easily, but only for certain JavaFXML files, how to fix this?
Here’s my code I’m struggling with (I marked the line that’s giving me errors): At this point, it does exactly what I want it to do, it loads a new scene of “CreateAccount.fxml” file whenever I click the login button. But I want it to load a different FXML file, so I change the n…
Opening app on macOS 11 Big Sur from JavaFX application randomly fails with kLSNoExecutableErr
We have a desktop JavaFX application (well, TornadoFX) that downloads an archive, extracts another app from it and launches this app with macOS open command. Simplified kotlin code looks like: This has worked for years on older versions of macOS (10.15 and earlier) but now with macOS 11 Big Sur launching the …
NoSuchFileException java
So I’m currently working on a java fx project and I am trying to get my program to read 2 txt files (name.txt) and (password.txt). When I run this in IntelliJ it works as intended but when I run the jar file in power shell I get this: the code that is supposed to tell where to look at the
How to ensure Stage opens as a window and not a tab?
New stages traditionally opened as new windows.Then MacOS came around and introduced this in (System Preferences -> General): Now all my new JavaFX stages are all opening as new tabs on top of the first opened stage. If I change the system setting, stages once again open as windows. But I prefer to leave t…
How do I make the background of a WebView transparent?
I have a Maven project in IntelliJ IDEA, using JDK 15 and JavaFX 15. I tried: Set style for WebEngine Set blend mode for WebView Tried WebPage Nothing succeeded. How do I make the background of the WebView transparent? My module-info.java: My pom.xml dependencies: I created a new project and tried to implemen…
Gradle can’t access classes defined in module src/main from src/test with JavaFX plugin
I am trying to allow my test classes to access the main classes (in a standard gradle setup). It was working fine until I put my main classes in a module (for JavaFX), at which point all tests stopped working. The main code runs fine. If I understand correctly, according to this gradle documentation, doing no…
NullPointerException, even though object is pointing to the FXML instance
(I am using Scene Builder…) Here is the MusicGeneratorGUI class… Here I have instantiated the object from the FXML file with the same ID… However, System.out.println(icon); in the main method of the controller class produces null. The ‘icon’ Sphere object is null. Here is the mai…
What version of JRE should I use to run a Java 15 compiled program?
I am new to Java Programming. Recently I created a JavaFX program using the latest JDK 15 (https://www.oracle.com/java/technologies/javase-downloads.html) and the latest JavaFX SDK 15 (https://openjfx.io/index.html). Suppose that I need to deploy the application (.jar) in someone else’s computer. What i…