More Complex Database Manager on the NetBeans Platform

Starting with the new NetBeans Platform CRUD Application Tutorial, I ended up with a slightly more complex application. Here, there's also an OutlineView, which has its own Node, with Children that are added via a LookupListener on the Children object:

Note that the viewer and the editor are in 2 separate modules.

As a result, whenever an item is selected in the explorer view, it is (1) shown in the text fields, (2) added to the OutlineView, and (3) shown in the Properties window. However, when an item is selected in the OutlineView, the OutlineView synchronizes with the Properties window, so that the Properties window displays properties of the current item in the OutlineView.

Here's some code I received from Jiri Rechtacek, which is a good introduction to the OutlineView in relation to Nodes:

public class ExampleOutlineView extends JComponent implements ExplorerManager.Provider {

    private final Property[] properties;
    private final OutlineView outlineView;
    private final ExplorerManager manager;

    public ExampleOutlineView(final Node rootNode, final Property[] properties) { = properties;
        outlineView = new OutlineView();
        manager = new ExplorerManager();

        setLayout(new BorderLayout());
        add(outlineView, "Center");

    public final ExplorerManager getExplorerManager() {
        return manager;



I'm very interested in the OutlineView (with nodes). Do you plan to release the code?

Posted by RunningTracker on March 30, 2009 at 10:52 PM PDT #

The code is in the blog entry above.

Posted by Geertjan on March 30, 2009 at 10:57 PM PDT #

Oh, okay. I thought that maybe you would release the whole project.

Posted by RunningTracker on March 30, 2009 at 11:04 PM PDT #

I can send it to you if you like. Send me an e-mail at geertjan DOT wielenga AT sun DOT com.

Posted by Geertjan on March 30, 2009 at 11:08 PM PDT #

This got me wondering...can OutlineView handle multiple-selection like the PropertySheet can?

Posted by RS on August 10, 2009 at 09:15 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

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.


« May 2016