import javax.swing.*; import javax.swing.event.*; public class JTreeNone{ public static void main(String[] args){ JTree tree = new JTree(); tree.putClientProperty("JTree.lineStyle", "None"); JScrollPane scrollpane = new JScrollPane(tree); JFrame fm = new JFrame("JTreeNone frame"); fm.getContentPane().add(scrollpane, "Center"); fm.setSize(300,300); fm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); fm.setVisible(true); } }