Using NetBeans RCP on standalone Swing applications

The NetBeans Rich Client Platform is an excellent way to build robust enterprise-grade rich client desktop applications. Many companies are already doing it You have all the power of Java at your fingertips, combined with a sound module system and lots of tools and plugins (including OSGi stuff).

Did you know that you can also use the NetBeans Rich Client Platform in standalone Swing applications? Well, of course you won't be able to use the whole set of tools, but there's a great deal of things you can benefit from, including advanced easy-to-use Swing components such as tree tables and tree views.

A working example

I have created a Kenai project that uses some pieces of the NetBeans Platform in a standalone Swing application that you can run with JavaWebStart. The application allows you to search the most recent tweets in Twitter that match some criteria.

Of course the application is not very polished, but has some basic NetBeans specific features: it uses the Nodes API to represent entities and it contains four different NetBeans UI components: a PropertySheetView, an Outlineview, a BeanTreeView and a ListView, all working on the same model.

I am documenting the whole project in my documents area, so that you can learn the basics of NetBeans Platform development from within Swing applications. I have currently documented how to create a client-side model and how to create some NetBeans Nodes. During the coming weeks I'll slowly enhance the documentation in order to build a free to use tutorial.

Benefits

As I said above there're many things to lose if you don't use the whole NetBeans Platform. Anyway there're great benefits of using just some pieces of it in standalone Swing applications:

  • Your end up with a thinner application.
  • You can learn the basics of NetBeans Platform UI design more quickly, because you just use a few APIs.
  • It's easier for you to migrate an existing swing application to the Platform: just start with the model and the UI, and keep on moving to the whole set of features.

I hope you enjoy the tutorial as much as I enjoy the Platform!

Cheers,

Antonio

blog comments powered by Disqus