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

How to implement a NumberField in javaFX 2.0?

I need to insert a number field into my UI. So I need to check the key events on a text field in order to check whether the input character is a number. I created a class by extending TextField. If there is a method in TextField class which handles…
Anuruddha
  • 1,367
  • 6
  • 19
  • 38
21
votes
1 answer

javafx 8 compatibility issues - FXML static fields or methods

I have designed a javafx application which works fine in jdk 7. When I try to run it in java 8 I am getting the below exceptions: javafx.fxml.LoadException: at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2617) at…
Christopher_Daniel
  • 273
  • 1
  • 2
  • 7
21
votes
3 answers

JavaFx2 or ScalaFx + Akka

How to run Akka actors in a JavaFX/ScalaFX Application ? (This is an update of question based on the first answers) Is the solution to share the same execution context? Meaning having the Actors dispatchers based on the JavaFx ExecutorService ? (The…
MaatDeamon
  • 9,532
  • 9
  • 60
  • 127
21
votes
3 answers

How to drag an undecorated window (stage) of JavaFX

I have this undecorated window: public static void initStartPage(final Stage primaryStage) { final Stage startPage = new Stage(); startPage.initStyle(StageStyle.UNDECORATED); //startPage.initOwner(primaryStage); …
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
21
votes
4 answers

JavaFX ImageView without any smoothing

Is it possible to render a scaled image in an ImageView in JavaFX 2.2 without any smoothing applied? I'm rendering a 50x50 image into a 200x200 ImageView, with setSmooth(false), so each pixel in the source image should map to a 4x4 square on the…
ajselvig
  • 688
  • 1
  • 5
  • 12
21
votes
2 answers

How do I work with JavaFX in Eclipse Juno?

I have installed jdk1.7.0_15. JavaFX's download page says the following: JavaFX 2.2.7 contains the latest security fixes and is co-bundled with the latest JDK 7 for Windows, Mac and Linux. Download Java SE 7 with JavaFX 2.2.7 Like a…
An SO User
  • 24,612
  • 35
  • 133
  • 221
21
votes
2 answers

get the contents from the webview using javafx

I am working on a swing application using JAVA FX controls . In my application i have to take print out the html page displayed in the webview . What I am trying is to load the html content of webview in a string with the help of HtmlDocuement. To…
adesh singh
  • 1,727
  • 9
  • 38
  • 70
21
votes
2 answers

Where can I download the JavaFX 2.2 source code?

I need to link in Netbeans 7.2.1 to the source of JavaFX 2.2.3, I've looked on the Oracle web site ... but I didn't find it ! any help is a welcome plz
user813853
21
votes
1 answer

JavaFx 2.x : How to draw dashed or dotted lines?

I would like to dynamically change the draw of a line from solid, dotted or dashed: it seems I have to use line.setStroke, is it the correct method? And, how to accomplish this? Thanks
Alberto acepsut
  • 1,972
  • 10
  • 41
  • 87
21
votes
8 answers

JavaFX 2.1 MessageBox

Good day! I am developing a program using JavaFX SDK. I wanted to have a message box like in C#: DialogResult rs = MessageBox.showDialog("Message Here..."); if (rs == ....) { // code } I want to have a functionality like this using JavaFX…
iSa
  • 1,144
  • 2
  • 9
  • 21
20
votes
3 answers

Get real position of a node in JavaFX

What is the best way to get the absolute position of a node in JavaFX? Imagine we have a node in a Pane (Hbox, Stackpane, or any other pane) and that may have a parent itself. I want to get the absolute position of that node and use it in another…
maryam
  • 387
  • 2
  • 3
  • 10
20
votes
5 answers

How to convert a normal java project in intellij into a JavaFx project

I am currently using a normal java project (gradle project) and want to convert this into a JavaFx project without having to reimport the existing sources into a new Javafx project. Is there any way to achieve this?
Wizard
  • 1,154
  • 2
  • 14
  • 41
20
votes
2 answers

Constantly Update UI in Java FX worker thread

I have Label label in my FXML Application. I want this label to change once a second. Currently I use this: Task task = new Task() { @Override public Void call() throws Exception { int i = 0; …
Killerpixler
  • 4,200
  • 11
  • 42
  • 82
20
votes
3 answers

JavaFX Scene Builder: pointer cursor onMouseOver

Is it possible to set the mouse cursor to become a pointer (hand) when hovering a Node width JavaFX Scene Builder? How?
Morrandir
  • 595
  • 1
  • 4
  • 19
20
votes
2 answers

SimpleStringProperty set() vs. setValue()

What is the difference between set(String) and setValue(String) in the SimpleStringProperty class? I know that set(String) is derived from StringPropertyBase, but this makes me even more wonder, why there additionally is setValue(String)?
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270