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
25
votes
8 answers

Combobox clearing value issue

I've stumbled on an issue with Comboboxes in javafx2.2. This is the scenario: Users click on the 'editFile' button. Another pane becomes visible (with the setVisible method). This pane contains 6 comboboxes. Three of them have fixed items:…
Perneel
  • 3,317
  • 7
  • 45
  • 66
25
votes
3 answers

table column won't take full size of the table view in javaFX

i am trying to create a table with two columns. i am using the scene builder included in netbeans 7.2. in all the examples i have seen all you need to do is drag the table column to the table and it will take the full size, this is not true in my…
Raven
  • 713
  • 2
  • 10
  • 21
25
votes
4 answers

How do you unit test a JavaFX controller with JUnit

What's the proper way of initializing the JavaFX runtime so you can unit test (with JUnit) controllers that make use of the concurrency facilities and Platform.runLater(Runnable)? Calling Application.launch(...) from the @BeforeClass method results…
metasim
  • 4,793
  • 3
  • 46
  • 70
24
votes
1 answer

UITableView - Better Editing through Binding?

Linked to question: JavaFX 2: Save edit in TableCell There seems to be allot of plumbing required for to establish an editable tableview - namely trapping all the events for each textField (gained/lost focus, tabbing away from the textField,…
jkaufmann
  • 924
  • 1
  • 8
  • 15
24
votes
3 answers

Tree item select event in javafx2

I have created the treeview in javafx2. i need to write the event for getting clicked node name. pls let me know how to do this?
velsachin
  • 905
  • 2
  • 8
  • 13
24
votes
1 answer

Javafx 2 TreeView - hide root item

I created my own TreeView in JavaFX 2 with this tutorial. However I want to hide my root node. How it looks like right now: Root element Parent 1 Child 1 Child 2 Parent 2 Child 1 How it should look: Parent 1 Child 1 Child 2 Parent…
Muki
  • 3,513
  • 3
  • 27
  • 50
24
votes
2 answers

How to populate a TableView that is defined in an fxml file that is designed in JavaFx Scene Builder

I would like to know how do I populate a TableView with data... All the examples I have seen creates a TableView with columns and everything and add it to the scene. All done in the java code itself. What I want to know: if I design my "form" in…
cp5
  • 1,087
  • 6
  • 26
  • 58
24
votes
1 answer

JavaFX select item in ListView

Hi I am trying to set focus on an item in a listview. After a user opens a file the item is added to the listview, but the issue I am having is that the listview is not setting focus on the new item that was added. I have to click the item in the…
user16380
  • 383
  • 1
  • 3
  • 7
23
votes
1 answer

What is the "mnemonicParsing" attribute in Java FX

I have been working with SceneBuilder and I observe that it applies the attribute of mnemonicParsing and equates it to false for every Node that I make. What exactly is it? What difference does it make in Layout.xml?
Tilak Madichetti
  • 4,110
  • 5
  • 34
  • 52
23
votes
6 answers

TableView: adjust number of visible rows

I'm using this table to display data in Table View: import javafx.application.Application; import javafx.beans.property.IntegerProperty; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleStringProperty; import…
user1285928
  • 1,328
  • 29
  • 98
  • 147
23
votes
3 answers

Basic JUnit test for JavaFX 8

I want to create basic JUnit test for JavaFX 8 application. I have this simple code sample: public class Main extends Application { public static void main(String[] args) { Application.launch(args); } @Override public void…
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
23
votes
6 answers

JavaFX TextArea and autoscroll

I am trying to get a TextArea to autoscroll to the bottom with new text which is put in via an event handler. Each new entry is just one long string of text with each entry separated by a line break. I have tried a change handler which sets…
Sam Keays
  • 736
  • 1
  • 5
  • 17
23
votes
4 answers

JavaFX Pass MouseEvents through Transparent Node to Children

In the java doc it says for setMouseTransparent that is affects all children as well as the parent. How can it be made so only the parent's transparent areas (can see other nodes below it but not responding to mouse events) are transparent to…
BAR
  • 15,909
  • 27
  • 97
  • 185
23
votes
2 answers

How to create Splash screen with transparent background in JavaFX

I am trying to create a splash screen like the example I've provded. It seems that AnchorPane does not allow transparent background, I've tried setting the css of the AnchorPane to -fx-background-color: rgba(255,0,255,0.1) ; but the white background…
francisOpt
  • 860
  • 1
  • 8
  • 15
23
votes
1 answer

Multithreading in JavaFX hangs the UI

I have a simple JavaFX 2 app, with 2 buttons, saying Start and Stop. When the start button is clicked, I want to create a background thread which will do some processing and update the UI (e.g a progress bar) as it goes along. If the stop button is…
Ali
  • 261,656
  • 265
  • 575
  • 769