Search code examples
javaswingjtree

JTree cannot see expand tree icons when hiding root


When I create a JTree and call setRootVisible(false), I cannot see the little tree opening icons, I can still double click on the node to expand it but cannot see them on the first level. Any ideas?


Solution

  • Seems you need to call setShowsRootHandles(true), to see them.