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
208
votes
17 answers

JavaFX Application Icon

Is it possible to change the application icon using JavaFX, or does it have to be done using Swing?
Sebb77
  • 2,431
  • 2
  • 17
  • 18
103
votes
8 answers

How to get stage from controller during initialization?

I want to handle stage events (i.e. hiding) from my controller class. So all I have to do is to add a listener like this: ((Stage) myPane.getScene().getWindow()).setOn*whatIwant*(...); But the problem is that initialization starts right after this…
Chechulin
  • 2,426
  • 7
  • 28
  • 35
102
votes
5 answers

JavaFX - setVisible hides the element but doesn't rearrange adjacent nodes

In JavaFX, if I have a scene with 2 VBox elements and each VBox has multiple Label in it. If I set the top VBox to invisible, why does the bottom VBox not move up the scene where the top VBox was ? The VBox is invisible but I would expect the…
Gillardo
  • 9,518
  • 18
  • 73
  • 141
95
votes
3 answers

Where has the JavaFX scene builder gone?

I am trying to find the elusive JavaFX scene builder so I can use it in Intellij. I am on Windows OS. Oracle have stated that the JavaFX scene builder is included in a new download, but no matter how I search I cannot find it (see…
tentimes
  • 1,462
  • 1
  • 11
  • 16
88
votes
13 answers

How to close a JavaFX application on window close?

In Swing you can simply use setDefaultCloseOperation() to shut down the entire application when the window is closed. However in JavaFX I can't find an equivalent. I have multiple windows open and I want to close the entire application if a window…
Kshitiz Sharma
  • 17,947
  • 26
  • 98
  • 169
69
votes
7 answers

Detect doubleclick on row of TableView JavaFX

I need to detect double clicks on a row of a TableView. How can I listen for double clicks on any part of the row and get all data of this row to print it to the console?
Marcos
  • 4,827
  • 3
  • 20
  • 28
69
votes
26 answers

JavaFX 2.1 TableView refresh items

I have this common issue, as it appears to be. My table view wont refresh my items after I reset them. I have checked the data and it's the new one. I tried multiple solution from internet but no success. Can't reset all the columns because it…
user1236048
  • 5,542
  • 7
  • 50
  • 87
66
votes
7 answers

How to avoid Not on FX application thread; currentThread = JavaFX Application Thread error?

Below code snippets is giving me error Not on FX application thread; currentThread=JavaFX Application Thread.This application was working fine in java 1.7 but when i moved it to fx8 it is now giving error. when I start the application on my 1st…
Rajesh Kumar Dash
  • 2,203
  • 6
  • 28
  • 57
62
votes
4 answers

JavaFX: Stage close handler

I want to save a file before closing my JavaFX application. This is how I'm setting up the handler in Main::start: primaryStage.setOnCloseRequest(event -> { System.out.println("Stage is closing"); // Save file }); And the controller calling…
Heine Frade
  • 723
  • 1
  • 5
  • 4
62
votes
3 answers

How perform task on JavaFX TextField at onfocus and outfocus?

I am working on JavaFX project. I need to perform some task on a JavaFX TextField. For example on the "on focus" event for the TextField I want to print System.out.println("Textfield on focus"); and on the "out focus" event it should…
java baba
  • 2,199
  • 13
  • 33
  • 45
61
votes
2 answers

Remove the default 'no content in table' text for empty javafx table

I would like to remove or change the default text shown by an empty javafx table from No content in table to something more meaningful for the user. For example in a table showing students, when there are no students to show I want it to say "No…
58
votes
11 answers

AutoComplete ComboBox in JavaFX

I'm looking for a way to add autocomplete to a JavaFX ComboBox. This AutoFillBox is known but not what I'm searching. What I want is a editable ComboBox, and while typing the list should filtered. But I want also to open the list without typing and…
JulianG
  • 1,551
  • 1
  • 19
  • 29
55
votes
1 answer

Value Change Listener for JavaFX's TextField

I would like to add a kind of listener to my JavaFX's TextField which when ever a user changes the value of the TextField, the Application prints something on the console. I've searched and i find the following very similar question : Value Change…
Elyas Hadizadeh
  • 3,289
  • 8
  • 40
  • 54
48
votes
5 answers

How to right align a button in Java FX toolbar

I am building a UI using Java FX scene builder and I want a button in a toolbar to float towards the right side of the toolbar. I have tried changing the node orientation of the parent(toolbar) and also the button but both seem to be ignored.
44
votes
5 answers

JavaFX8: How to create listener for selection of row in Tableview?

I currently have two tableviews in one screen, which results in both TableViews have rows which the user can select. Now I want only one row to be selected at the same time (doesn't matter which TableView it is selected from). I was thinking about…
bashoogzaad
  • 4,611
  • 8
  • 40
  • 65
1
2 3
99 100