Swing GUI Design Using XML
Simplifying Swing development using SimpleObjectBuilder . A class to build the objects (using Reflection API) reading from an XML stored locally or remotely. XML consists of very few tags and the usage is not limited to Swing. There were many such attempts by many developers, but I tried to make it more generic and simple. Personally I think, JFC has everything for regular GUI development, only coding discipline is required to introduce to achieve maintainable code.
check out the website : http://javawala.googlepages.com/index.html
[550 byte] By [
digibabaa] at [2007-11-26 19:21:45]

# 4
Why Swing? Why not HTML?
I always hear this type of conversation among the developers in a new UI meeting. I say: why not AJAX? Why not Openlaszo?
What I have noticed in those types of meeting: The decision is always driven by the specific type of development knowledge of those developers. This is absolutely wrong.
HTML is easy, Swing is tough. Where as easy and tough is very relative statement. Perception about easy and tough changes with time with the improvement of visualization capability.
UI should be decided based on what is required. No doubt HTML is the most powerful universal UI, but why to break head to achieve complex UI design for add/update information work flow and the users are within the intranet.
I say java swing is the best choice. With this statement many developers disagree because they think coding is complex. Ok. Let抯 see?
To write a submit button in HTML
<INPUT type="submit" value="Search" id=攎yButton?
onsubmit=攃all some java script?br> onmouseclick=攃all some java script?br>>
If I do in swing, I will have the same in XML.
<Object type=攋avax.swing.JButton?value=擲earch?id=攎yButton?gt;
<listenerMethod name=攋ava.awt.event.ActionListener.actionPerformed?/>
<listenerMethod name=攋ava.awt.event. MouseListener.mouseClicked?/>
<Object>
I don抰 see any difference except, in the first case browser will render the Object and in the second you write a little code to parse the XML and create the Object using Reflection API and attach the necessary listeners.
Some one may say, HTML is stored at the server side, so making changes in the UI is easy.
I say, No problem. Save the XML is in server side and get inputStream from URL.In either case rendering client program has to be in the Client machine (Browser or Your program running on already installed jre)
With the improvement of Webstart (JNLP) deployment process, swing deployment is no more like old days. Client jar synching is real easy using webstart client and you can start the application from the browser.
I started with this idea about a year ago and successfully deploy many UI with this approach. I had to migrate my VB/C++ GUI client and servers to J2EE .
Choosing swing for the client side I achieved many things:
1.I kept the same workflow and look and feel ( saved user training to use new software) and saved workfolw reengineering time.
2.Easy integration with the webservice.
3.As I work in Government , 508 is very important. Swing components are accessible.
Initially my main concern was laying out the components. That抯 why I have developed XYPanel. Check in my website: http://javawala.googlepages.com/index.html
All about this writing is to share the programs which I have written for me (were useful for me), may be those will be useful for others.