public Component getDemoPanel() { TableModel model = new SampleTableModel(); _sortableTable = new SortableTable(model); _sortableTable.setAutoResizeMode(JideTable.AUTO_RESIZE_FILL); _sortableTable.setNestedTableHeader(true); _sortableTable.setFillsGrids(false); TableColumnGroup longText = new TableColumnGroup( "This is a very long column header title. You can resize the table header column and see how this long text automatically wraps according to the column width. " + "The current configuration specified {minimum two rows:f:red} and {maximum five rows:f:blue}. You could take a look at StyledLabelBuilderDemo to see what other annotations are available in the text.@r:3:2:5"); longText.add(_sortableTable.getColumnModel().getColumn(0)); longText.add(_sortableTable.getColumnModel().getColumn(1)); longText.add(_sortableTable.getColumnModel().getColumn(2)); longText.add(_sortableTable.getColumnModel().getColumn(3)); longText.add(_sortableTable.getColumnModel().getColumn(4)); longText.add(_sortableTable.getColumnModel().getColumn(5)); longText.add(_sortableTable.getColumnModel().getColumn(6)); if (_sortableTable.getTableHeader() instanceof NestedTableHeader) { NestedTableHeader header = (NestedTableHeader) _sortableTable.getTableHeader(); header.addColumnGroup(longText); } TableHeaderPopupMenuInstaller installer = new TableHeaderPopupMenuInstaller(_sortableTable); installer.addTableHeaderPopupMenuCustomizer(new TableColumnChooserPopupMenuCustomizer()); TableUtils.autoResizeAllColumns(_sortableTable); return new JScrollPane(_sortableTable); }