How to find an element with an ID in JavaFX?
Try TableView tb = (TableView) scene.lookup(“#history”);
Try TableView tb = (TableView) scene.lookup(“#history”);
Update for the March 2018 Java Client Roadmap I encourage readers interested in this question to review the following Oracle Whitepaper: Java Client Roadmap Update The above paper outlines the official Oracle position on related technologies (JavaFX/Swing/AWT/Applets/WebStart), the dates until which it intends to support those technologies and which of those technologies it intends to … Read more
According to the packages list in Ubuntu Wily Xenial Bionic there is a package named openjfx. This should be a candidate for what you’re looking for: JavaFX/OpenJFX 8 – Rich client application platform for Java You can install it via: sudo apt-get install openjfx It provides the following JAR files to the OpenJDK installation on … Read more
You can use Timeline for that task: Timeline fiveSecondsWonder = new Timeline( new KeyFrame(Duration.seconds(5), new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { System.out.println(“this is called every 5 seconds on UI thread”); } })); fiveSecondsWonder.setCycleCount(Timeline.INDEFINITE); fiveSecondsWonder.play(); for the background processes (which don’t do anything to the UI) you can use old good java.util.Timer: new Timer().schedule( … Read more
The application automatically stops when the last Stage is closed. At this moment, the stop() method of your Application class is called, so you don’t need an equivalent to setDefaultCloseOperation() If you want to stop the application before that, you can call Platform.exit(), for example in your onCloseRequest call. You can have all these information … Read more
As indicated here, JavaFX is no longer included in openjdk. So check, if you have <Java SDK root>/jre/lib/ext/jfxrt.jar on your classpath under Project Structure -> SDKs -> 1.x -> Classpath? If not, that could be why. Try adding it and see if that fixes your issue, e.g. on Ubuntu, install then openjfx package with sudo … Read more
For IntelliJ14 you may have to change the bytecode version w.r.t. the JDK you are using (in the global settings):
I’m going to add one more answer here, just to provide what I think is the most minimal approach. In my Eclipse setup, I have e(fx)clipse installed, which provides one fix for this, as well as providing many useful development features that you will almost certainly want if you are writing JavaFX applications. This is … Read more
With JDK8u40, according to this: Starting with Oracle Java SE 8u40, Oracle does not provide a separate set of accompanying JavaFX Scene Builder binaries. If you would like to contribute changes, ideas or just let us know what you have done with the code, please consult the OpenJDK Community contribution guidelines and join the openjfx-dev … Read more
As mentioned in the comments, the Starting Guide is the place to start with Java 11 and JavaFX 11. The key to work as you did before Java 11 is to understand that: JavaFX 11 is not part of the JDK anymore You can get it in different flavors, either as an SDK or as … Read more