X

Geertjan's Blog

  • December 6, 2011

A Docking Framework & Module System for JavaFX

Geertjan Wielenga
Product Manager

Kevin Rushforth from the JavaFX team, plus others from the JavaFX team, are in the booth right next to the NetBeans booth here at JavaOne Latin America. Talking about Swing and JavaFX, etc, Kevin told me that there's a SwingInterop sample in the set of samples that come with NetBeans IDE 7.1:

I had always assumed that that sample showed how to embed Swing components inside a JavaFX app. However, the opposite is now the case because the sample was rewritten at some point. Now you end up with an application structure like this:

Run it and you see this:

When you type something in the JTable above, the JavaFX graph updates, while showing cool up/down animations as the data changes. Switch to the other tab and you see the JavaFX WebView.

Not much later we had the JavaFX panes above running in a NetBeans Platform application, using TopComponents instead of a JTabbedPane:

Here the browser window is detached:

What's the benefit? Well, now JavaFX has a docking framework and a module system. In other words, in addition to the window system that you see above, each of its windows can be plugged into the application at runtime. And... now Swing developers have JWebPane, at last, as well as cool animations in their graphs.

Join the discussion

Comments ( 6 )
  • Ilhami Visne Tuesday, December 6, 2011

    Dear Geertjan,

    For a better swing integration, would you vote for this issue: http://javafx-jira.kenai.com/browse/RT-15739

    Thanks,

    ilhami


  • zhouzx_gogo Tuesday, December 6, 2011

    Hello,I would like to embed javafx netbeans platform of topcomponent inside. Mainly display charts and web pages. How would I do?

    How webview which show flash or flex it?


  • guest Wednesday, February 29, 2012

    Nice. Um... where can I download the enhanced demo?


  • RX247 Friday, May 25, 2012

    Hello Geertjan,

    I apologize if this question isn't directly related to your post, but in terms of features added to JavaFX, where do we stand on a docking framework?

    http://javafx-jira.kenai.com/browse/RT-14039 has been raised but is very low priority.

    Is the interim solution to have the whole frame/docking in Swing (Like JIDE) and just have the other contained components in FX (http://docs.oracle.com/javafx/2.0/swing/jfxpub-swing.htm)?

    Thanks in advance for your answer,

    Best regards,

    Antony


  • Geertjan Friday, May 25, 2012

    This is the wrong place to ask that question. But I agree, JavaFX really needs a docking framework. The fact that this is a very low priority in the JavaFX bug tracking system implies to me that JavaFX is't really serious about getting a docking framework, which tells me that JavaFX isn't serious about being a player when it comes to large corporate applications. The solution continues to be to use Swing if you want to create large corporate applications and to embed JavaFX components into your large corporate applications, in the places where it makes sense to do so.

    Until JavaFX has a docking framework -- and a plugin system -- anyone wanting to create large corporate applications should logically use the NetBeans Platform, since both these features are part of the NetBeans Platform out of the box.


  • guest Sunday, September 16, 2012

    Will Netbeans framework be converted to JavaFX? As it is said, it should not be too difficult to convert Swing applications to JavaFX. Then, all applications can be developed in pure JavaFX. Is this the future ? Or we have to always work with both Swing and JavaFX.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.