Questions tagged [javafx-2]

OUTDATED - DO NOT USE FOR GENERAL JAVAFX QUESTIONS! JavaFX 2 provides a Java-based UI platform for creating standalone or browser-based Rich Client Applications. Its Java API enables Java developers to leverage existing skills and tools. The next version - JavaFX-8 was released March 18, 2014.

Useful resources:

JavaFX links :

Testing JavaFX-2 applications :

OpenJavaFX links :

JavaFX Scene Builder links :

Blogs and news sites about JavaFX :

Projects, complementing and extending basic functionality of JavaFX :

Books about JavaFX 2 :

Personal blogs, by people, who write about JavaFX :

Use javafx-8 tag for questions, related to javafx-8 (or javafx-3 - previous name), which will be released as part of JDK-8 - the sequel of javafx-2.

4858 questions
20
votes
7 answers

JavaFX application still running after close

I'm having problem to close my javaFX application, when I click the close button from my stage, my application disappears but if I look for it in my task manager my application still there without close. I've tried to use this code below to force it…
Victor Laerte
  • 6,446
  • 13
  • 53
  • 102
20
votes
2 answers

JavaFX LineChart Hover Values

I am in the process of creating a line chart in JavaFX. All is good currently and it successfully creates the chart with the data I need from a database stored procedure. Anyway what I require if possible is for every data point on the LineChart to…
Uniqum
  • 355
  • 2
  • 3
  • 10
20
votes
1 answer

JavaFX 2 custom popup pane

The JavaFX 2 colour picker has a button that pops up a colour chooser pane like so: I'd like to do something similar, in that I'd like a custom pane to pop up when the button is clicked on and disappear when something else is clicked (in my case, a…
Michael Berry
  • 70,193
  • 21
  • 157
  • 216
20
votes
1 answer

JavaFX How to set max/min window size?

Does setMinSize() work on containers such as GridPane, for example? I have found that in my program GridPane ignores min. size properties while resized manually. Here is the FXML code:
Chechulin
  • 2,426
  • 7
  • 28
  • 35
20
votes
5 answers

javafx, TableView: detect a doubleclick on a cell

Given a TableView, i need to detect the doubleclick on a cell. tableView.setOnMouseClicked(new EventHandler() { @Override public void handle(MouseEvent event) { if(event.getClickCount()>1) { …
AgostinoX
  • 7,477
  • 20
  • 77
  • 137
20
votes
2 answers

How to change sub fxml gui parts at runtime with Button Click

I'm tryin to build a skeleton for a big complex gui, so the idea is to make everything with mvc like style in javafx 2.1, so every component has a fxml file and if needed css,controller and model. I'm tryin to figure out how to change sub scenes(sub…
Snow
  • 223
  • 1
  • 2
  • 7
20
votes
3 answers

Where does javafx.scene.image.Image("flower.png") look for flower.png?

I would like to know what the JavaFX Image constructor's relative path resolution algorithm is for: Stand-alone apps. Browser deployed apps. Webstart deployed apps. If the algorithm may look in multiple locations, I'd like to know what they are…
jewelsea
  • 150,031
  • 14
  • 366
  • 406
19
votes
5 answers

javaFX 2.0 set component to full width and height of immediate parent

How can I make a TextArea take the full width and height of the parent pane. I tried this: TextArea textArea = new TextArea(); textArea.setScaleX( 100 ); textArea.setScaleY( 100 ); but the element defined in the top via parent.setTop(...) was…
Farouk Alhassan
  • 3,780
  • 9
  • 51
  • 74
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
3 answers

How can I style the ProgressBar component in JavaFX

I am trying to add custom css styling to the JavaFX ProgressBar component but I couldn't find any information on the topic. I am looking for the css class names and the css commands that are required to: set the color of the progress bar itself…
Yoav Kadosh
  • 4,807
  • 4
  • 39
  • 56
19
votes
3 answers

Timers and javafx

I am trying to write a code that will make things appear on the screen at predetermined but irregular intervals using javafx. I tried to use a timer (java.util, not javax.swing) but it turns out you can't change anything in the application if you…
i .
  • 485
  • 2
  • 10
  • 23
19
votes
2 answers

Center stage on parent stage

I am creating an application in JavaFx, In which I want to do that if any child stage is getting opened then it should be opened in center of parent stage. I am trying to do this using mystage.centerOnScreen() but it'll assign the child stage to…
Ronak Jain
  • 2,402
  • 2
  • 24
  • 38
19
votes
3 answers

How to set Tool Tip on the each Cell of JavaFX Table Mouse-Over?

I am new to JavaFX. I have created a TableView that looks like the image attached. I would like to show a tool tip on each cell of the table when I mouse over. I have already set two CellFactory; one to display a check-box in the first column and…
Ashish Pancholi
  • 4,569
  • 13
  • 50
  • 88
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