JTree:  hide the connecting lines between nodes

Posted on 2005-04-12
Last Modified: 2006-11-18

I need to hide the connecting lines on some trees in our application, (but not on all trees).
The app uses a number of look and Feels (some from JideSoft inc) for Windows and Metal.
I have experimented with     tree.putClientProperty("JTree.lineStyle", "None");
but this only works on Java look and feel, not Windows types.
I have also tried     UIManager.put("Tree.paintLines", Boolean.FALSE);
but this turns them off across the entire application.

Any ideas?
Question by:richard_fairall
    1 Comment
    LVL 92

    Accepted Solution

    The UI properties should only apply to any trees created *after* you change the property.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    zeroFront challenge 7 58
    Receive file in Servlet 1 28
    factorial example challenge 10 44
    wordmultiple challenge 12 64
    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now