Questions tagged [javafx-8]

JavaFX 8 (previously named JavaFX 3) introduces a new API for JavaFX technology. JavaFX 8 supports 3D and brings up a Retina-Display Support. It is part of the JDK8.

JavaFX 8 is part of the JDK 8

Useful resources:

JavaFX-2 links, actual for JavaFX-8 :

Testing JavaFX-2+ applications :

Declarative languages for JavaFX :

OpenJavaFX links :

JavaFX Scene Builder links :

Blogs and news sites about JavaFX :

Projects, complementing and extending basic functionality of JavaFX :

Books about JavaFX 2 technology :

Personal blogs, by people, who write about JavaFX :

Use javafx-2 tag for questions, related to JavaFX 2+ (versions 2.0+), which is the prequel of javafx-8.

Use JavaFX 2 bug tracker to file and track issues about bugs and incompatibility (having previously checked, that dublicates are not existing already, and it is not an intended change).

5923 questions
20
votes
1 answer

Root hasn't been set Error with Java 8 Eclipse

Recently I installed Java 8 build 124 for my JavaFX application and I started getting these errors: javafx.fxml.LoadException: Root hasn't been set. Use method setRoot() before…
j will
  • 3,747
  • 11
  • 41
  • 64
19
votes
4 answers

Install openJDK+openJFX 8 on Ubuntu 20

I'm trying to install OpenJDK 8 and OpenJFX 8 on Ubuntu 20.10. Installing openJFX 8 has always been a little tricky on Ubuntu, but I used to be able to do it using the tip from this SO answer: https://stackoverflow.com/a/56166582/2423283 That used…
NateW
  • 908
  • 1
  • 8
  • 28
19
votes
3 answers

JavaFX - getScene() returns null

I just started using JavaFX Scene Builder to build a small application. It is made up of a controller class 'Login.java' which belongs to 'login.fxml', in which the FXML file 'registrierung.fxml' is loaded via a method called…
The_Dude
  • 397
  • 1
  • 3
  • 16
19
votes
2 answers

General Exception handling in JavaFX 8

Given the controller of a Scene calls business code which raises an Exception. How can I handle those kind of Exceptions in a general fashion? I tried the Thread.setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler) method but it is not…
Hannes
  • 5,002
  • 8
  • 31
  • 60
19
votes
1 answer

Set multiple styleClass values

How does one set two classes on a node in a JavaFX FXML file? This adds one value "notice high" instead of two values "notice" and "high". How can I add two values?
John Kugelman
  • 349,597
  • 67
  • 533
  • 578
19
votes
2 answers

Copiable Label/TextField/LabeledText in JavaFX

I just want to create copiable label in JavaFX. I have tried to create TextField that have no background, have no focus border and default background color, but I have no success. I have found a lot of questions how to remove focus background from…
zapletnev
  • 493
  • 1
  • 5
  • 15
19
votes
1 answer

Set two root nodes for TreeView

Is there a way to set two root nodes for one TreeView? I found many example if simple TreeView but there is no useful example for my case.
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
19
votes
2 answers

How to style menu button and menu items

I tried to change styles in menu button. I could change menu button style but not its menu item. No matter what i try menu item inside menu-button remains unchanged. .menu-button { -fx-background-color:black; } .menu-button .label { …
Vinod CG
  • 1,041
  • 4
  • 15
  • 24
18
votes
3 answers

Can you specify minor jdk version for travis ci

Is it possible to specify the minor version of the JDK for jobs running on Travis? I have a JavaFX project which is failing because JDK 1.8.0_31 is being used to perform the build where as the project uses some classes that were only shipped in Java…
bmooney
  • 391
  • 6
  • 15
18
votes
1 answer

ObservableList: how to reliably detect a setAll?

In some contexts it's necessary to detect - in a ListChangeListener, without control about the list itself - a "all data swapped out", f.i. when we need to clear some state like selection - on completely new data the old state is meaningless.…
kleopatra
  • 51,061
  • 28
  • 99
  • 211
18
votes
2 answers

Scala using Java libraries, taking advantage of lambda expressions support in Java 8

According to: http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html#lambda-expressions-in-gui-applications Previously: btn.setOnAction(new EventHandler() { @Override public void handle(ActionEvent event) { …
SpaceMonkey
  • 4,143
  • 5
  • 38
  • 60
18
votes
5 answers

How can I make a TextArea stretch to fill the content, expanding the parent in the process?

So I have a TextArea and as the user pastes paragraphs into it, or just writes in it, I want it to expand vertically to reveal all the available text. I.e. not to use a scrollbar in the text field itself... much like what happens on many web pages.…
Daniel Gerson
  • 2,159
  • 1
  • 19
  • 29
18
votes
2 answers

How to write text along a Bezier Curve?

I am looking to do something like this in javafx 2.2 or at least in javafx 8. I browsed the Text javadoc and css reference without results. It is possible to do this effect by displaying and svg in a WebView. But my application have to display a…
gontard
  • 28,720
  • 11
  • 94
  • 117
17
votes
2 answers

IdentitySet / IdentityHashSet (use IdentityHashMap)

I know about IdentityHashMap, but I need to use to something like "IdentitySet" (use equals as o1 == o2 ). I'm going to use one to listen Observable list with "extractor" (JavaFX): List deleteList = new ArrayList<>(); List addList…
kozmo
  • 4,024
  • 3
  • 30
  • 48
17
votes
1 answer

how can I set the controller in the scene builder?

I want to use sceneBuilder for a javaFx application. I have a Package that is called testPac and inside that I have the folders as has been presented in figure 1; I have one fxml file and its controller inside the view folder. now, I don't know…
Delsa
  • 303
  • 1
  • 2
  • 10