Geertjan's Blog

  • March 23, 2009

More Complex Database Manager on the NetBeans Platform

Geertjan Wielenga
Product Manager
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) {
this.properties = properties;
outlineView = new OutlineView();
manager = new ExplorerManager();
setLayout(new BorderLayout());
add(outlineView, "Center");
public final ExplorerManager getExplorerManager() {
return manager;

Join the discussion

Comments ( 5 )
  • RunningTracker Tuesday, March 31, 2009

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

  • Geertjan Tuesday, March 31, 2009

    The code is in the blog entry above.

  • RunningTracker Tuesday, March 31, 2009

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

  • Geertjan Tuesday, March 31, 2009

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

  • RS Monday, August 10, 2009

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

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