This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Controlling the front end layout through xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Controlling the front end layout through xml" Watch "Controlling the front end layout through xml" New topic
Author

Controlling the front end layout through xml

sai kishan singh thakur
Greenhorn

Joined: Nov 27, 2008
Posts: 3
Hi All,

I have some xml files which will store the data that has to be populated on to the front end. I am using this data from the xml and laying out in to the horizontal and vertical sections making changes in the java code.
My question is: Can we do this layout control in xml itself ?. The end customer using this tool should be given the flexibility to decide his own layout (through xml modifications by some tool) instead of modifying source code.

Thanks
Sk
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18712
    
    8

Sure, why not? You just have to do some architecting and design so that the layout can be described in an understandable way in XML, before you start coding.
sai kishan singh thakur
Greenhorn

Joined: Nov 27, 2008
Posts: 3
Hi Paul,

Thanks for the prompt response.
Can you please show it through some example please ?.

Thanks
Saiki
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18712
    
    8

Well, as I said there's a fair amount of design for you to do. A GUI is a complicated thing. That implies that me just dreaming up a short example for you isn't going to be practical. Not for a forum post, anyway.

But it really isn't hard. Start by figuring out what features you want in your GUI. (Have you done that yet?) Then design an XML document which can hold specifications of those features. Those are the easy parts. The hard part is to write code which parses the XML and interfaces with the GUI-generating code to format the GUI accordingly.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
Try a search for "user interface design in XML" - a number of people have experimented with this sort of thing.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Controlling the front end layout through xml