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

JavaFX IllegalAccessException during FXML load()

I have a dialog window that is invoked by the following code (DialogController is a helper class for using modal dialog windows; it mainly bundles together a controller reference with its window): void handleServicesEdit(ActionEvent event) throws…
scottb
  • 9,908
  • 3
  • 40
  • 56
16
votes
2 answers

Why won't the children in my JavaFX HBox grow (SceneBuilder)?

The JavaFX docs for HBox say: If an hbox is resized larger than its preferred width, by default it will keep children to their preferred widths, leaving the extra space unused. If an application wishes to have one or more children be allocated that…
Ryan J
  • 2,502
  • 5
  • 31
  • 41
16
votes
9 answers

JavaFX stop opening URL in WebView - open in browser instead

The embedded WebView browser I am using needs special handling for particular URLs, to open them in the native default browser instead of WebView. The actual browsing part works fine but I need to stop the WebView from displaying that page as well.…
Dreen
  • 6,976
  • 11
  • 47
  • 69
16
votes
1 answer

JavaFX2: Can I pause a background Task / Service?

I am trying to set up a background service that would perform bulk loading of transaction data from a csv file. This background service would be initiated from a menu item action mapped to a method in the controller/presenter class. Ever so often,…
Lambda II
  • 173
  • 1
  • 7
16
votes
2 answers

How to make an undecorated window movable / draggable in JavaFX?

I have to create an application in which minimize and maximize button will be disabled. I have used "StageStyle.UNDECORATED" with which the application will not be movable or draggable anymore, so I am searching for any other alternative to make my…
Shreyas Dave
  • 3,815
  • 3
  • 28
  • 57
16
votes
2 answers

TableView has more columns than specified

When using a TableView in JavaFX 2, there seems to be magically one column added instead of resizing the existing ones. Please see the following screenshot. What I would expect/want: Both column shall have 50% of space, no third (unnamed/empty)…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
16
votes
1 answer

Jersey Producing media type conflict

I'm trying out Jersey at the moment, followed this link to set up a web service in netbeans. I have my entities classes and my REST classes. It works to add, edit, delete, request objects (in this case Users objects) from a javafx2 client. However,…
Perneel
  • 3,317
  • 7
  • 45
  • 66
16
votes
1 answer

Execute a task after the WebView is fully loaded

Is it possible to have a task automatically run after the WebEngine finishes loading? I know I can get a Worker from WebEngine to indicate loading progress, but it seems like repeatedly polling the Worker not an elegant solution (i.e. locking up…
JavaMonkey22
  • 861
  • 11
  • 20
15
votes
3 answers

How do specify a width percentage in JavaFX 2 using FXML?

I am looking for a way to say set a maxWidth size to 80% in FXML. Much like in web development. But this does not: I know that in Straight JavaFX2 non-fxml you can create…
ril3y
  • 912
  • 4
  • 10
  • 19
15
votes
2 answers

How to pass object created in FXML Controller1 to Controller2 of inner FXML control

I have a JavaFX 2.0 application, which consists of two FXML files, and two controllers for them + one "main" .java file. At the start time, FXML1 is initialized, like this: public void start(Stage stage) throws Exception { stage.setTitle("Demo…
Victoria Agafonova
  • 2,048
  • 10
  • 33
  • 50
15
votes
1 answer

Best way to get pixel data from a JavaFX Canvas?

Is it possible to get ARGB pixel data from a javafx.scene.canvas.Canvas? I am aware that javafx.scene.image.Image provides a PixelReader for performing this operation but I would like to get this data directly from the canvas if possible.
Troy Squillaci
  • 415
  • 3
  • 9
15
votes
3 answers

Is there a way to take away focus in javafx?

I know that your can give focus to a node in javafx by doing node.requestFocus(); but is there a way to take away focus from a node in javafx or prevent focus on an object?
sazzy4o
  • 3,073
  • 6
  • 34
  • 62
15
votes
1 answer

Frosted Glass Effect in JavaFX?

I'm making an iOS7-themed JavaFX2/FXML project and I was wondering how I could make a Rectangle object have a iOS7-like frosted glass effect. I'd also like it to have a small shadow. This is tricky, since you might be able to see the shadow behind…
Taconut
  • 951
  • 4
  • 10
  • 29
15
votes
2 answers

How can I style a JavaFX menu and its items in CSS?

I've got a MenuBar that is setup as follows in FXML:
crush
  • 16,713
  • 9
  • 59
  • 100
15
votes
1 answer

Bidirectional binding with ObjectBinding in JavaFX

I have a simple bean that has some properties related with each other. For example, this bean has a property called discountRate and another called discountValue. The discountRate is the percentage (%) of discount applied to a sale. The…
brevleq
  • 2,081
  • 10
  • 53
  • 97