private JComponent makeTitledPanel(String title, JTree tree) { JPanel p = new JPanel(new BorderLayout()); p.setBorder(BorderFactory.createTitledBorder(title)); p.add(new JScrollPane(tree)); tree.setRowHeight(0); return p; }
/** Sets the row height of the tree, and forwards the row height to the table. */ public void setRowHeight(int rowHeight) { if (rowHeight > 0) { super.setRowHeight(rowHeight); if ((JTreeTable.this != null) && (JTreeTable.this.getRowHeight() != rowHeight)) { JTreeTable.this.setRowHeight(getRowHeight()); } } }