Adam Bien's Weblog
Java FX App on the official winter olympics site
The "Medal Visualizer" app: http://www.vancouver2010.com/olympic-medals/geo-view works well. Its actually a good test for the penetration of the Java FX platform. See also Oracle's the press release.
Posted at 10:03PM Feb 13, 2010 by Adam Bien in RIA / Java FX | Kommentare[16]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
Some Screenshots Of The JavaFX Composer Tool
The Java FX Composer wiki was updated with some screenshots. A teaser:

Posted at 02:05PM Dec 31, 2009 by Adam Bien in RIA / Java FX | Kommentare[0]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
Java FX Composer / Designer for NetBeans 6.8 - First Smoke Test
- Installation: smooth and fast directly from the Tools -> Plugins (don't forget to click the "Reload Catalog" button in the plugin manager). It takes about 30 seconds - you don't even have to restart NetBeans 6.8!
- Usability: similar to NetBeans Matisse (Swing GUI designer). A WYSIWYG designer for UIs with Source / Designer views. The resulting code is more concise, comparing it to matisse. The generated code cannot be modified in the editor manually - very similar to matisse.
- Generated code: actually clean and concise. It uses coordinates for the FX Nodes - so it works well.
- Data Sources: Java FX composer comes with JDBC, HTTP (XML / JSON), FileSystem and File datasources, as well as nested Filters. The Java FX code is generated into a directory and is o.k.
- States: an interesting vehicle for designing state transitions between states. State transition can be initiated by e.g. actions / events. Handy for navigations and designing the state changes between scenes.
- Data Binding: most (all?) components properties can be visually bound. Interesting: there are already built-in converters in place which helps you to convert String -> String[] or (DataSource) Records -> String[]. You can e.g. bind easily a JSON services to a list component. Binding a JSON/REST datasource to a ListView is possible in seconds. XML and other formats seem not to be supported right now.
- Templates: are an interesting way to scaffolding. E.g. the Desktop Form template makes the generation of a business form easier.
Posted at 09:00AM Dec 15, 2009 by Adam Bien in RIA / Java FX | Kommentare[1]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
NetBeans 6.8 Java FX Editor For Production? - First Smoke Test
The editing experience was dramatically improved in NetBeans 6.8 (comparing to NetBeans 6.7 or the "old" eclipse plugin), especially:
- renaming (refactoring) of functions, classes etc. works like in Java
- moving of classes between packages works (references / imports are updated) - also with drag and drop
- find usages / overriding methods in open projects / current project works
- quick fix for e.g. imports works (alt+enter)
- ctrl+click navigation between classes works
- ctrl+o (go to type) "full text search in types" works
- format works
- "fix imports" works
- AND: nice, new splash screen and file icons in the project tab :-)
What I miss:
- (alt+insert / ctrl+i) code generation inline wizard
- more intelligent quick fixes like: create field / variable inline wizard
- out-of-the-box maven integration like in Java / Java EE projects in NetBeans 6.8
NetBeans 6.8 Java FX editor was greatly improved, comparing it with NetBeans 6.7. The new improvements do significantly improve the productivity. I only miss tables, trees and more sophisticated components - then Java FX would be perfectly viable for enterprise, as well as, internet projects. A visual designer would be also nice :-).
Posted at 09:00AM Dec 14, 2009 by Adam Bien in RIA / Java FX | Kommentare[2]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
Java FX Composer / Designer for NetBeans 6.8 - First Screenshots and Tutorial
Java FX Composer screenshots as well as first tutorials are available. Java FX Composer will (at December, 15th) be an extension of NetBeans 6.8 FX capabilities. It is similar to the already available GUI designer for Swing applications.
NetBeans 6.8 comes already with improved Java FX script editor, and especially: “...improved semantic and syntactic highlighting, source navigation, faster code completion, code folding, javadoc pop-ups, refactoring, and error detection and hints, such as fixing import statements and packages. Now you can Go to Types, Find Usages, and navigate through code with hypertext links...”
With Java FX 1.3 and so the availability of tables, trees etc, Java FX will become a viable alternative to current Swing / SWT / JFace applications.
Posted at 09:00AM Dec 11, 2009 by Adam Bien in RIA / Java FX | Kommentare[3]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
How To Fix The FXEvaluator On Java FX 1.2 and JDK 1.6
A simple invocation of the FXEvaluator:
var output = FXEvaluator.eval("{2+3}");
println(output);
Will cause the following error on JavaFX SDK 1.2 and JDK 1.6 (Mac OS X):
java.lang.NoClassDefFoundError: com/sun/tools/javafx/script/JavaFXScriptEngineFactory
at javafx.util.Evaluator.eval(FXEvaluator.java:33)
at javafx.util.FXEvaluator.eval(FXEvaluator.java:88)
at dynamicfx.Main.javafx$run$(Main.fx:17)
at dynamicfx.Main.javafx$run$(Main.fx:17)
It seems like the JSR-223 runtime is not in the JavaFX classpath. Only JDK 1.5 classes are included in the compilation and runtime classpath. Including JDK 1.6 classes directly to the JavaFX-runtime will cause another runtime-error. It seems like the Java FX SDK comes with a modified javac compiler.
To fix the problem, just prepend the script-api.jar and the javafxc.jar to the bootclasspath. This is easily possible in the file ${javafx_home}/profiles/desktop.properties. Just change the entry from:
# execute_bootclasspath_prepend=
to:
execute_bootclasspath_prepend="${javafx_home}/lib/shared/javafxc.jar;${javafx_home}/lib/desktop/script-api.jar"
You don't have to change anything in the IDEs. It just works in netbeans 6.5.1 FX and eclipse 3.5. After this fix, you will be even able to evaluate Java FX dynamically inside the already dynamic script :-):
var output = FXEvaluator.eval("{2+3 + (javafx.util.FXEvaluator.eval('{2}') as Number)}");
println(output);
Moving the whole value of the execute_classpath into the execute_bootclasspath_prepend with both jars (see above) prepended fixes the problem as well.
Posted at 02:41PM Jul 18, 2009 by Adam Bien in RIA / Java FX | Kommentare[0]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
Java FX Plugin For Eclipse By JBoss - Some Screenshots
It seems like JBoss guys are working on a Java FX plugin for Eclipse. There are some screenshots available. These are actually very good news - competition is always good. Only IntelliJ is lacking Java FX support now. But who knows what happens at JavaONE :-).
Posted at 09:00AM May 11, 2009 by Adam Bien in RIA / Java FX | Kommentare[14]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
A Nice Trading / Charting, Opensource Applet
An interesting, opensource applet, visualizes stocks, can be used for charting as well. So - check out the Sun (Java) stocks and try to predict the next deals :-).
Posted at 12:56PM Apr 10, 2009 by Adam Bien in RIA / Java FX | Kommentare[1]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
Java FX (Script) And Why It Is Intriguing - Especially For Java Developers, Not Only Designers
-
Java FX Script is consistent - everything is an expression. Knowing that helps a lot.
- Additional access modifiers (script-only, public-read, public-init) allow leaner approaches for building, not only visual, components.
- The „skeleton“ of a Java FX application is the scene graph. It is a tree structure starting with stage, scene and has nodes as leafs. It represents a platform independent model of any visual application. You could actually map this „meta-tree“ to any technology you want. I believe this exactly happens in the desktop and mobile profiles (requires further investigation :-)).
- There is no additional ceremony required to call Java objects - its straight forward. Existing Java code can be easily reused.
- RESTful (JSON/XML) communication is supported out-of-the-box.
- The „bind“ operator enables building of lean Model View Presenter (Passive View / Supervising Controller) applications with clean seperation of concerns. Modification of variables and even functions are tracked directly, without implementing PropertyChangeListeners etc.
- Triggers killed getters and setters. You can expose attributes directly and intercept the calls when needed.
- Java FX Script is perfect suitable for building casual and not only „flashy“ applications. The majority of Swing components is already exposed to Java FX script.
- Domain specific extensions like the duration datatype or frame-based animation framework makes the development of animations easier.
- Java FX Script integrates very well with applets and webstart. It is a natural extension of Java-based RIAs. The idea of dragging an applet out of the browser and install it as an application is simple, but really good :-).
Posted at 09:00AM Feb 23, 2009 by Adam Bien in RIA / Java FX | Kommentare[12]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices
100.000.000 JavaFX Runtime Downloads - Is It Ubiquitous Now?
JavaFX runtime was already 100.000.000 times downloaded. The questions is: can it be then considered as a ubiquitous platform? And if not, when? :-)
Posted at 09:00AM Feb 20, 2009 by Adam Bien in RIA / Java FX | Kommentare[5]
[my tweets]
Rss My book: Real World Java EE - Rethinking Best Practices

