Home > OutlineView > Recipe 8: Hide node column in OutlineView

Recipe 8: Hide node column in OutlineView


The OutlineView is a combined tree/table structure. As a consequence, when using it to display tabular data, the node column is displayed as the first column of the table in addition to the data columns. How can I remove it?


In older (< 7.0) versions of NetBeans, it was recommended to use this trick:


However, it is not a good idea to remove this column because NetBeans is using it. The recommended way, that works in 7.0 (there seems to be a bug in previous versions), is:

Outline outline = outlineView.getOutline();
TableColumnModel columnModel = outline.getColumnModel();
ETableColumn column = (ETableColumn) columnModel.getColumn(0);
((ETableColumnModel) columnModel).setColumnHidden(column, true);
Categories: OutlineView
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: