Simplified Usage of the NetBeans Platform

The latest NetBeans Platform application showcased at NetBeans Zone, Zirius, the Norwegian ERP System, is illustrative of how the bare minimum of the NetBeans Platform can be used, to the point where the NetBeans Platform doesn't show through at all:

On the one hand, this means that you're not leveraging the width and breadth of all that the NetBeans Platform provides. On the other hand, it takes time to migrate an application to the NetBeans Platform and the above is a logical first stage. Though you have modularity, an update mechanism, and a loosely coupled mechanism for communication across modules via the Lookup API, you keep everything else exactly as it was before: same UI, including same toolbar and menu bar.

That's possible because you can remove everything from the NetBeans Platform and start with a clean slate, in so far as the user interface is concerned:

Above, there's a single NetBeans TopComponent, with its tabs removed. The toolbar is removed and the menu bar is removed, with some dummy menu items added via a custom menu bar. Now you can treat the TopComponent like a JPanel and simply add all your UI components within it.

The application above looks like this: 

And the sources can be downloaded here:

http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/misc/NBContainer

The code in the repo above was written following the instructions described in the Zirius article. Using those sources, you can very easily create strictly defined user interfaces, i.e., without the flexible NetBeans window system, with a tree view on the left and a GUI pane on the right, like this, for example, i.e., an image viewer:

Similar applications on the NetBeans Platform, i.e., leveraging low level infrastructure, while all the rest are custom UI components within a single TopComponent, can be read about in these two articles:

What's also cool about the Zirius story is that Toni and I visited that company two years ago and, clearly, the NetBeans Platform message did not fall on deaf ears!

Comments:

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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today