1 Reply Latest reply on May 21, 2013 1:58 PM by 935844

    JTree custom DefaultTreeCellRenderer with custom DefaultMutableTreeNode

      Is there a way to create my own version of DefaultTreeCellRenderer that does not use DefaultMutableTreeNode? I tried copying an example of a custom DefaultTreeCellRenderer but I can’t cast the "value" in getTreeCellRendererComponent() to my own version of DefaultMutableTreeNode.

      From the looks of the documentation below shouldn't I be able to do that?

      Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)