Summary

In this chapter we demonstrated several ways to combine XML with Swing graphical user interfaces. As a primer, we also covered the basic concepts of Swing GUIs.

The DomViewer application demonstrated how we could use the DOM API as a TreeModel delegate in order to render the DOM as a JTree.

Swing's Model-View-Controller architecture was explained. Even though MVC is used to represent widgets in Swing, we explained how it can also be used as an application architecture. XML fits into the MVC architecture as a superb model format. As a second example of this, we demonstrated the use of XML as a JTable model.

The chapter closed with a discussion and demonstration of the use of XML in graphical user interface construction. We walked through an example that renders a menu from a Menu Markup Language description file. For those familiar with the open source Mozilla project (http://www.mozilla.org), this is similar to the approach used to generate the browser's user interface.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.199.243