Abstractics XmlPanel
A flexible Java Swing Runtime Layout Manager Current Version: 1.1

Welcome!

NOTE: XmlPanel 1.1 has been released. Online documentation (and documentation that is included with the distribution) is still in progress for completion, but we have decided to get the source and .jar file distributed.
This documentation is sufficient, but more indepth documentation is being worked on.

The Abstractics XmlPanel is a configurable layout for Java Swing that uses an XML format to describe the layout of components in a panel. It allows the developer to describe robust layouts of components on the fly in a manner that is easier to use than the typical "add component to panel" methods in most layout managers.

What Advantage Does This Have?

There is nothing special about the layouts that result from using the XmlPanel. A developer could just as easily use GridBagLayout, or a myriad of other layout managers to achieve the same result. However, using the XmlPanel layout gives freedom to the developer. All of the following are now available to the developer:

  • Quickly mock UI design - Bringing up an empty window and filling it with UI described by XML becomes a quick and powerful way to "mock up" UI
  • Leave UI details until later - Make a simple panel with the things that are needed to move on. Worry about adding the UI "fluff" and "prettiness" later.
  • Runtime editability - The layout can be edited with the panel displayed, allowing the developer to continually adjust and tweak the display and be able to immediately see the results. No more "run the UI, don't like the UI, stop the JVM, make the adjustment, run the UI again".
  • Runtime layout - Since the UI layout is contained in an XML file, it now becomes possible to manipulate the UI without the need for a redeployment of code. Have two customers using the same application but want different UIs? Just give them different XML files for the layout!

The XmlPanel certainly won't work for everyone, and it's not intended to. We went after the 80/20 rule and think it can be used for most layouts that are needed. It has been created to be extendable and customizable so that developers are free to work with the components as they desire, but leave the burden of layout to something a little more flexible.