I have a <configuration> XML file with interations of <operation>, e.g.
<configuration> <operation>...</operation> <operation>...</operation> ...and so on </configuration>
Each operation can define a number of variable tags which are specific to that operation. All operations have at least a <name> tag.
I want to design a GUI application which will conveniently display the XML to make it easier for a user to view and edit it, without having to open a text editor to browse a large and messy XML file and scrolling down to locate an operation and carefully editing it.
My question is, what would be the best way to design such a GUI application? What components should I use? I thought about having some sort of window with two frames on the left and right. On the left there would be a simple List box with all the operation names (pulled from the XML). When a user selects a particular operation, its associated tags would be displayed on the right with various "label-textfields" for each tag. This would need to be dynamic because the tags within each operation are not fixed, so one operation may need just 4 labels-textfields whilst another may need 10. I have seen some other components such as Trees which could be useful.
Can someone think of anything better/simpler or anticipate any problems? I am thinking about using JDOM as my XML parser for reading and writing the configuration, and either Swing or SWT (still undecided) for the GUI API.
Any ideas very welcome.
[ January 23, 2005: Message edited by: Kashif Riaz ] [ January 23, 2005: Message edited by: Kashif Riaz ]
You could use a List like you stated. You could also use a JTree. Along with those you could display the editable info in a simple for or you could use something like a Properties Box. There are really numerous ways to do it. It's hard to suggest just one.
Who are you making this app for? Maybe you could ask a group of end users how they would like to edit the XML file?