Deeper Integration of JavaFX in NetBeans RCP

Nodes and Properties window integrated so that when the sales property changes, the javafx.scene.chart.BarChart is updated.

A screenshot of the JavaFX chart in the context of a Swing application. The up/down animations in the chart as the sales property is changed (in the JTable or in the Properties window or by renaming the Node) are pretty cool.

To create the above, I started out with the Paint Application (a NetBeans RCP example distributed with NetBeans IDE), then migrated some of the JavaFX code discussed in the previous blog entry, added a node hirerachy, and that was all.

By the way, the above is how I see JavaFX fitting into the real world of existing Java desktop applications. No one is going to throw Swing out the window completely, that wouldn't make any sense. However, where it makes sense to do so, which is in fewer places than what might be assumed, a corporate enterprise (as opposed to a game-oriented) Java desktop application could gain from some of the aspects of the JavaFX story.

Comments:

Hello, can provide source code, I want to learn how to achieve it? Thank you.

Posted by zhouzx_gogo on December 07, 2011 at 12:13 PM PST #

See the above example, I want to know is how to achieve, and can provide the source code for learning about, I believe is the best Netbeans RCP rich client platform.
I'm using it to develop budget management platform, I need to integrate charts and MS Excelt, word or openoffice. Is there any good solution? Thank you

Posted by zhouzx_gogo on December 07, 2011 at 12:22 PM PST #

As so often Geertjan, you are spot on what is of interest to a humble corporate enterprise desktop application developers hopes and dreams. I was exactly looking for this kind of heterogeneous integration. It is a start in the correct direction. I.e. careful inject FX components where possible and where its give added value, have it living side by side with swing in peace. Instead of total swing replacement - which as you said makes no sense in the real world. I am looking forward and get inspired to try out to add/replace a few components. Thanks !

Posted by Bernd Ruehlicke on December 08, 2011 at 02:26 AM PST #

Nice , but where is the source code ?

Posted by Patrick Boulay on December 08, 2011 at 05:57 PM PST #

Would you like to share why replacing swing with javafx makes no sense? I agree if you're solely talking about existing apps, but newly started projects? Are there any specific reasons to start a new project in swing rather than javafx - besides platform maturity?

As I see it, it makes no sense to create new swing apps. In ongoing projects though, I would certainly agree. (Unless you're doing a complete restructuring of your UI.)

Just curious if I have missed some fundamental flaw in the JavaFX way of doing things that makes Swing a platform for the future too! :)

Posted by Per-Erik Svensson on December 21, 2011 at 02:21 AM PST #

There's going to be a mixing of Swing with JavaFX for a long time to come. For example, there are hundreds, probably thousands, of existing Swing components out there in the world. So, if you are only going to use JavaFX, you're going to be reinventing the wheel a lot of the time. The NetBeans Platform, for example, is a set of Swing libraries. Any large application makes complete sense to be created on top of the NetBeans Platform (free plugin system, free docking framework, etc)... but that means you're not using JavaFX.

Posted by Geertjan on December 21, 2011 at 05:30 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today