JavaFX is an expressive rich client platform for creating and delivering rich Internet experiences. More on JavaFX can be found at http://javafx.com/.
JavaFX was the Official Rich Client Technology for the 2010 Winter Games. [http://www.oracle.com/us/corporate/press/049166]. I forsee the technology getting a push from Oracle specially after the Sun-Oracle merger. Infact I have read somewhere that JavaFX will be same to java Swing, what JSF was to Struts.
And it was surprising to find there is no support in JDeveloper currently for JavaFX. (Offcourse now with Sun deal, Netbean with JavaFX support goes to Oracle but still for the lovers of Jdev its missing.)
I tried creating one extension for JavaFX support in Jdeveloper. Its based on version 1 of JavaFX. [With the latest sdk of JavaFX we now have compiler for JavaFX files and I will try to adapt extension to support new APIs of JavaFX in near future.]
Installing the extension is simple. Follow the following steps:
2) Download jfx.zip and extract the jar files to your <Jdev_home> folder. It should save the jar files under <Jdev_home>\jfx\lib folder.
3) A tweak to copy the JFX files to classpath is required. Right click on Project, select Project Properties, select Compiler and add .fx to "Copy File Types to Output Directory."
Adding the extension will enable a new menu under General section as JavaFX. Use the menu to create new JavaFX file with default code.
This will create a new JavaFX file with the following code:
import javafx.ui.*;
import java.lang.System;
var win = Frame {
title: "Test Application"
width: 300
height: 300
centerOnScreen:true
menubar: MenuBar {
menus: Menu {
text: "File"
mnemonic: F
//first item in the menu
items: [MenuItem {
text: "Help"
mnemonic: H
//on-click operation
action: operation() {
MessageDialog {
title: "About"
message: "JavaFX Application!"
visible: true
}
}
},
MenuItem {
text: "Exit"
mnemonic: X
//on-click operation
action: operation() {
//exit the application
System.exit(0);
}
}]
}
}
content: Label {
text: "New Application"
}
visible: true
};
Use the Run menu to run the file.
I hope I can write new extension soon to provide the "compile" and "run' facility with the latest version of JavaFX sdk in Jdeveloper.