Swing GUI Design Using XML

The tool consists of a class called SimpleObjectBuilder which reads the XML to build the objects and apply methods as specified in the Object builder XML using java Reflection API. The main motivation to come up with this tool is to simplify the swing component assembly. In regular business environment, GUI design doesn’t really involve any core component design. In a day to day work most of the time it’s all about assembling existing components. As the development possibilities are thousands, SWING GUI development generally ends up with the complicated code which is unreadable at a glance. Another problem in Swing development is action coding, which is achieved by attaching action listener class with the interactive component. If the code is not consolidated in proper way, action listener for each and every interactive component makes the code very dirty and unreadable. In my development approach, GUI design is completely separated from the action code and the action listeners are implemented in a much optimized fashion in a code generated from the GUI layout XML and the hook for implementation code is given via abstract methods generated by the tool. Once we look in to the following small Application, it will be clearer. more... 1