Question: how to use jtree in java swing?
Answer: import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; public class TreeExample { JFrame f; TreeExample(){ f=new JFrame(); DefaultMutableTreeNode style=new DefaultMutableTreeNode("Style"); DefaultMutableTreeNode color=new DefaultMutableTreeNode("color");