| Author |
Creation of GUI from xml file
|
Avinash Rakkasagi
Greenhorn
Joined: Nov 24, 2011
Posts: 8
|
|
Hi,
I have an xml file containing a list of items as-
My question is: How do I code in java in order to display this in a tree structure in a GUI?
It should be displayed as:
Added to it, there should be an option to expand and compress the contents of the tree also.
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4167
|
|
Hi Avinash, and welcome to the Ranch!
You would need to load the data into a TreeModel and display it using a JTree. You can read more about using JTree in the tutorial linked from its API.
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Avinash Rakkasagi
Greenhorn
Joined: Nov 24, 2011
Posts: 8
|
|
Darryl Burke wrote:Hi Avinash, and welcome to the Ranch!
You would need to load the data into a TreeModel and display it using a JTree. You can read more about using JTree in the tutorial linked from its API.
@ Darryl Burke: Could you be more specific, I am new to Java programming. Thanks in advance.
|
 |
John Jai
Bartender
Joined: May 31, 2011
Posts: 1778
|
|
|
I believe he is pointing you to the tutorial - http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html
|
 |
 |
|
|
subject: Creation of GUI from xml file
|
|
|