I’m trying to use SwingX’s TableColumnExt class to set a prototype value for the column’s width in the hierarchical column of a JXTreeTable. After I initialize the model and table I do this:
TableColumnExt column = dataTable.getColumnExt(0);
column.setPrototypeValue(500);
When my table is rendered, all columns are equally sized. These are the methods I’m using on the JXTreeTable instance.
dataTable.setRowHeight(28);
dataTable.setFillsViewportHeight(true);
dataTable.setHorizontalScrollEnabled(true);
What am I doing wrong here?
As already mentioned in my comments, it’s a bug. The issues are many-fold:
A workaround involves
Below is a custom ColumnFactory and its usage (not formally tested, so take it with a grain of salt :-).