Class JTreeUtil


  • public final class JTreeUtil
    extends Object
    Utility methods for working with JTree.
    • Method Detail

      • setRenderer

        public static void setRenderer​(JTree pTree,
                                       TreeCellRenderer pRenderer)
        Sets tree cell renderer without destroying tree selection and expansion state.
      • expandTreeNodes

        public static void expandTreeNodes​(JTree pTree)
        Expand all tree nodes.
      • toPrimitiveArray

        public static int[] toPrimitiveArray​(Collection<Integer> pCollection)