In this section, you will learn to create JTree along with a dividing Line. Here the tree gets divided into two parts separated by a line. Both trees has the same root and the nodes. A JScrollPane provides a Scrollable property for viewing components to scroll.
This program creates a box and two trees (tree1 and tree2). These trees contains the multiple nodes with a root and scrollable property to scroll on the scroll bar to view nodes. The box divides frame into to two parts and sets the requirements. Here the first tree sets in the west side on the frame and another on the east side.
Here is the code of program:
Output this 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