Customizing Tree.collapsedIcon for a single JTree

前端 未结 3 965
醉酒成梦
醉酒成梦 2020-11-30 15:49

I know that you can change the Tree.collapsedIcon for a all JTrees in an application using Swing using the UImanager. For example:

3条回答
  •  情深已故
    2020-11-30 16:00

    Only way I can see is to create your own version of JTree from the Java source code that allows you to define the icons for each JTree.

    I see that JTree gets the icons from javax.accessibility.AccessibleContext and eventually some defined class of the AccessibleIcon interface.

提交回复
热议问题