JXTreeTable に可変サイズの行を含めることは可能ですか? 、私は TreeExpansionEvent の行の高さを変更しようとしています (以下に示すように):
public void treeExpanded(TreeExpansionEvent e)
{
for (int i = 0; i < table.getRowCount(); i++) {
System.out.println("Value of img"+table.getValueAt(i,22));
if (table.getValueAt(i, 22) != null) {
table.setRowHeight(i,40);
table.repaint();
table.revalidate();
}
}
}
コードを実行すると、 Exception の下になります:
Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: variable height rows not supported
at org.jdesktop.swingx.JXTreeTable.setRowHeight(JXTreeTable.java:1321)
at ims.View.ViewImages.treeExpanded(ViewImages.java:559)
at org.jdesktop.swingx.event.TreeExpansionBroadcaster.fireTreeExpanded(TreeExpansionBroadcaster.java:85)
at org.jdesktop.swingx.event.TreeExpansionBroadcaster.treeExpanded(TreeExpansionBroadcaster.java:68)
at javax.swing.JTree.fireTreeExpanded(JTree.java:2766)
at javax.swing.JTree.setExpandedState(JTree.java:3616)
at org.jdesktop.swingx.JXTreeTable$TreeTableCellRenderer.setExpandedState(JXTreeTable.java:2921)
at javax.swing.JTree.expandPath(JTree.java:2204)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2266)
at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2253)
助けてください!