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
11
votes
3 answers

Set TextField width in JavaFX

How I can set the width of a TextField in JavaFX? TextField userTextField = new TextField(); I tried this: TextField userTextField = new TextField(); userTextField.setPrefWidth(80); But I don't see any change.
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
11
votes
3 answers

How to create tabs with icons in JavaFX

I want to create tabs panel with icons similar to the Firefox configuration panel with JavaFX: Is there any example which I can use to see how to implement this?
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
10
votes
3 answers

'Toolkit not initialized' exception when unit-testing an JavaFX application

When I try to perform unit tests on components which contain JavaFX controls I get a java.lang.IllegalStateException: Toolkit not initialized. How can components be unit tested which operate with JavaFX controls?
Hannes
  • 5,002
  • 8
  • 31
  • 60
10
votes
1 answer

How to convert byte array into javaFX image?

I am rewriting my question because I am struggle to find this solution. I've made a simple form to register some basic information about a student you know name, last name and so on. It also has an option to choose a photo by filechooser class to…
yfabio
  • 144
  • 1
  • 2
  • 8
10
votes
1 answer

How do I add a value to items in a ComboBox in JavaFX

How can I add a value to items in a combo box so when the user selects an item from the ComboBox I am able to display the price for that item Eg. if the user selects an animal I can display the price of that animal. The the user selects dog then I…
user6587841
  • 101
  • 1
  • 1
  • 9
10
votes
3 answers

Using JavaFX controller without FXML

Is there a possibility to use a controller with a JavaFX GUI without using FXML. I noticed that the FXML file contains an fx-controller attribute to bind the controller but i don't find it an easy way to work with it. Any ideas about have an MVC…
Hassam Abdelillah
  • 2,246
  • 3
  • 16
  • 37
10
votes
2 answers

Heavy rendering task (in canvas) in JavaFX blocks GUI

I want to create an application that performs many renderings in a canvas. The normal JavaFX way blocks the GUI: It is realy hard to press the button in the application code below (run with Java 8). I searched the web, but JavaFX does not support…
Mahe
  • 759
  • 1
  • 6
  • 21
10
votes
1 answer

How to automatically resize dialog pane when content is added?

For an application I am developing, I need the user to input a number of rows of data. The exact number is variable and the users should be able to add rows themselves too. I've got this all working now with a JavaFX Dialog, apart from the fact that…
Hayo Baan
  • 594
  • 5
  • 17
10
votes
4 answers

Javafx: TableView change row color based on column value

I have the following piece of code to update both the color of a column cell and its corresponding row: calltypel.setCellFactory(column -> { return new TableCell() { @Override protected void…
Dilpreet Kaur
  • 465
  • 2
  • 4
  • 12
10
votes
1 answer

JavaFX append text to TextArea throws Exception

Answer : JavaFX append text to TextArea throws Exception I have a thread that calculates the size of a directory. I use walkFileTree for this. To get some info, I append the actuall file to a textarea. But when I have a lot of files (ex. > 300) I…
Garog
  • 315
  • 1
  • 5
  • 15
10
votes
4 answers

How to center the content of a javafx 8 scrollpane

I have a ScrollPane, which contains a GridPane, which contains an ImageView, which contains an Image. What I want is for the Image to be centered in the GridPane. Without the ScrollPane I was able to accomplish this with…
Pentarctagon
  • 413
  • 2
  • 5
  • 12
10
votes
3 answers

Keep showing a dialog when validation of input fails

I currently have a dialog with four TextFields from which the input is collected. When the input can not meet my requirements, the dialog should stay open and show an error message. I currently have the following…
bashoogzaad
  • 4,611
  • 8
  • 40
  • 65
10
votes
1 answer

JavaFx animation poor performance, consumes all my CPU

I have written the following demonstration program. Four HBox(s) containing one Text node each, are added to the root (Group). The first and last are animated with a timeline to swap their positions. All the HBox(s) have the same css style. The…
C.LS
  • 1,319
  • 2
  • 17
  • 35
10
votes
2 answers

How to rotate the LinearGradient in a given Shape?

I try to find the way to rotate the LinearGradient object nested into e.g. Rectangle object, say: Rectangle rect = new Rectangle(0, 0, 200, 200); LinearGradient lg = new LinearGradient(0, 0, 100, 0, false, CycleMethod.REPEAT, new Stop[] { new…
bluevoxel
  • 4,978
  • 11
  • 45
  • 63
10
votes
1 answer

set HTTP headers in WebEngine JavaFX

How to pass the HTTP Headers like "Accept-Language", "Accept", "Accept-Encoding" to WebEngine in JavaFX? i have tried the method as specified in Setting a cookie using JavaFX's WebEngine/WebView, but it doesn't work. is there any API that is being…
Arun
  • 111
  • 1
  • 4