In this section you will learn to create a JTree using object that works with Hashtable.
This program simply creates a JTree and uses string type array. Program defines a string type array (Data) to keep multiple data to be displayed in a tree structure. Here the init() method that uses a Hashtable object to store data .This object is added to a JTree. Data is added in a tree node format.
Here is the code of this program:
Output of the program:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: May 30, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles