Hi, I'm using DefaultMutableTreeNode to display items in tree format.The whole tree structure developed is going to be added to a JScrollPane and then to a JFrame finally. The JFrame also has a button, which when clicked will display the above said tree structure and after each click should referesh the tree contents. Here is the code: import javax.swing.*; import javax.swing.tree.*; import java.awt.*; import java.awt.event.*; public class UIForForum extends JApplet implements ActionListener { JFrame frameObj = new JFrame("Sample Frame"); JTree tree; DefaultMutableTreeNode root = new DefaultMutableTreeNode(&
More>>

Hi,
I'm using DefaultMutableTreeNode to display items in tree format.The whole tree structure developed is going to be added to a JScrollPane and then to a JFrame finally. The JFrame also has a button, which when clicked will display the above said tree structure and after each click should referesh the tree contents. Here is the code: