Spotting JavaFX Apps in the Wild - A Freebase Browser
Occasionally I'll showcase a JavaFX Script app in this blog that I've found on the net. This one is an app that I'm developing to serve as a browser for the Freebase database. Freebase is a structured data approach similar to the Wikipedia concept, where the public contributes facts into a database (see freebase.com).
As Doctor Emmett Brown said in the movie Back to the Future, "please excuse the crudity of this model, I didn't have time to build it to scale or to paint it". In other words, this app is still under development, but it's functional. I'll be the first to admit that I'm graphically challenged, so it's not "pretty" (I'll showcase some apps with cool graphics in future posts, and you'll know that I didn't create them). Anyway, here's the Java Web Start (jnlp) link. You'll need JRE 1.5 or later to run JavaFX Script applications.
When you start the Freebase Browser, the Freebase ID for the band U2 is preloaded into the Freebase Object ID text field. Click the Go button (or just press Enter because it's the default button). You can then click and expand items in the tree in the left pane, or click links in the right pane, navigating to related topics. In the upper left hand corner are Back and Forward buttons, similar to a browser. In addition to clicking links, you can type Freebase object IDs in the text field (e.g. /topic/en/james_gosling or /topic/en/star_wars) and click Go.
If you're interested in the application architecture, here's a high level diagram that shows how the UI, application layer, and data layers are related. JavaFX Script very naturally implements the model-view-controller pattern.
By the way, the JavaFX InfiniteProgressPanel that you'll see when clicking links is part of the JavaFX UI library, and was originated by Romain Guy, the coauthor of the book Filthy Rich Clients.
Enjoy,
James L. (Jim) Weaver
JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications








Can you help me any code example about use trigger? Because new version of javafx do not support as old version. Why ask "trigger as setter/getter in java bean"?
Thank
Posted by: nhu_yeu226 | March 08, 2009 at 10:23 AM
hi james weaver what is the difference between custom node and custum swing component...
Posted by: farrukh obaid | March 05, 2009 at 05:30 PM
Sarah,
To see my attempt at answering your question, see the blog post at:
http://learnjavafx.typepad.com/weblog/2009/03/answering-reader-mail-about-the-javafx-reflection-api.html
Thanks,
Jim Weaver
Posted by: Jim Weaver | March 05, 2009 at 02:18 PM
Hi again,
you said "Also, JavaFX has reflection."
sorry,but i didn't understand very well..can u make it a little bit more clear ?
besides is there something similar to "Class.forName(str).getInstance();" but in JavaFX ? and who can also handel the properties like for example in the case of a SwingButton(text,action..)
Thanks
Posted by: Sarah.H | March 05, 2009 at 04:02 AM
"in the example of freebase browser,the data is dynamically supported by a server(XML,JSON,Http..)but the components of the browser are static,can't i have some dynamic generation of the component it self in a such aplication ?
i mean,i click on a button,so i will have a "generation" of a textfield for example(a query will be sent to the server calling for example for a "textfield",and i suppose that in the server there is a class components implemented ) and i will have in my desktop application a textfield that appears .
Is javafx support such a dynamic generation?"
Sarah,
Yes, that capability is available. The Scene in a JavaFX program contains a sequence of nodes (e.g. text fields, rectangles, images). You can dynamically add to this sequence. Also, JavaFX has reflection.
Thanks,
Jim Weaver
Posted by: Jim Weaver | March 03, 2009 at 10:44 AM
Hello ,
in the example of freebase browser,the data is dynamically supported by a server(XML,JSON,Http..)but the components of the browser are static,can't i have some dynamic generation of the component it self in a such aplication ?
i mean,i click on a button,so i will have a "generation" of a textfield for example(a query will be sent to the server calling for example for a "textfield",and i suppose that in the server there is a class components implemented ) and i will have in my desktop application a textfield that appears .
Is javafx support such a dynamic generation ?
thanks in advance
Posted by: Sarah.H | March 03, 2009 at 03:22 AM
I spotted this nice example of javafx with jdbc
http://java.dzone.com/tips/javafx-and-jdbc
Posted by: javanut | February 25, 2009 at 05:12 PM
"I have a doubt over the javaFx.That is by the javaFx scripting we can create Applets.Can we use it in the webdevelopment means how i can use the javaFx in my front -end..."
jayavardhan,
I think that JavaFX will work very nicely as the client in an enterprise application. I usually use Java Web Start to deploy the client, and there are HTTP, JSON and XML related classes in the JavaFX SDK 1.0 for communicating in JavaFX with servers. You can also instantiate and use any Java class with JavaFX, so virtually any client/server protocol (e.g. RMI) is supported.
Thanks,
Jim Weaver
Posted by: Jim Weaver | December 09, 2008 at 11:26 AM
Hi james..
I have a doubt over the javaFx.That is by the javaFx scripting we can create Applets.Can we use it in the webdevelopment means how i can use the javaFx in my front -end...
thanks..
Posted by: jayavardhan | December 09, 2008 at 06:19 AM