OOP-ReserchObject Oriented Programming for your better life

Java Swing GUI tool based on XML, XMLPanelEdit by OOP-Reserch

OOP-Reserch developed the Java Swing GUI tool, OOP XMLPanelEdit. By our easy-to-use Java Swing GUI tool, you can develop your Java client program easily. Because this Java Swing GUI builder represents the Java Swing GUI in XML, your Java client can be internationalization ready. With XMLPanelEdit, your Java Swing GUI can alter its representation on the fly. Java Swing GUI in multiple languages can be easily created. Just by editing XML, internationalization can easily be done.


OOP XMLPanelEdit Version 1.0 is no longer available. Please use OOP XMLPanelEdit Version 1.2

Swing, Swing, Swing!

Swing is the set of GUI related Classes supplied with JDK1.2. Especially, JTable,JTree,JList and the subclasses of JTextComponents are easy to update their contents due to the 'Model-View-Controller' architecture, which means the centralized data can be shared by client programs over the net.(Note: All other Swing GUI components are also based on the Model-View-Controller architecture.) And Swing GUI components are 'Event-driven', which enables us to define how each component respond to the actions from the users at our hand. With these characters, we can take the full advantage of OOP and build up the enterprise oriented GUI easily.

Image of ViewDialog
View Full image

Swing related link

And what do we need?

While the Swing provides us 'Freedom of programming' depending on its sophisticated concept, it is still somewhat tedious work to define how our GUIs can be represented on the screen, especially as for the position and the size of the each component. For example, even in case that we want to re-position a button on our GUI slightly more left, we have to modify our source code and recompile it again. And in case of somewhat complicated GUI Class, the most portion of our source code may be the GUI-related one, which leads to the difficulty for reading and manage it.
How happy we are if we can modify our GUI without touching any fragment of our source code! It is desirable to get rid of the portion of placing the GUI components from our source code. To archive this, we need the alternative way to represent the structure of our GUIs other than writing them in our source code directly.
The Swing based GUI has the nested structure, which means that some 'container' component holds other 'atomic' level components as its child components. Such a 'container' component knows how to place its child components in it. And each component has a set of the attributes which determines how it is represented, such as the size, the alignment, the font, the background color and so on. This means that we can represent the structure of our GUI in some abstract way. And as your know, XML is suitable solution for such a case.(XML is the way to represent the data along with its meaning.) The following is the quote from xml_panel_1_0.dtd, the DTD for representing Swing based GUI.

<!ENTITY % panel.mdl
"layout?,size?,border?,toolbar?,panel.child*">
<!ELEMENT panel (%panel.mdl;)>
<!ATTLIST panel
%opaque.att;
%panel.name.att;
%alignmentX.att;
%alignmentY.att;
%label.text.att;
%label.image.att;
%layout.border.constraint.att;
%access.name.att;
%access.descript.att;
%color.fg.att;
%color.bg.att;>
And the fragment of the XML document looks like this.
<panel opaque="false">
<layout>
<layout.border/>
</layout>
<size>
<preferred>
<dimension dimensionX="500" dimensionY="300"/>
</preferred>
<max>
<dimension dimensionX="500" dimensionY="300"/>
</max>
<min>
<dimension dimensionX="500" dimensionY="300"/>
</min>
</size>
<border border="RAISED">
<insets insets.bottom="10"
insets.left="10"
insets.right="10"
insets.top="10"/>
</border>
<toolbar opaque="false"
toolbar.direction="horizontal"
toolbar.float="false"
toolbar.layout.border.constraint="NORTH">
<insets insets.bottom="5"
insets.left="5"
insets.right="5"
insets.top="5"/>
<toolbar.child>
<component class.name="javax.swing.JLabel"
editable="false"
label.text="Select!"
opaque="false"
value.name="label"
wordwrap="false"/>
</toolbar.child>
.....
Now that it is easy to understand that any Swing based GUIs can be represented in XML if you are familiar with XML. (In case that it is not true for you, please understand that any Swing based GUIs can be represented in pre-formatted text file.) Moving the GUI-related part of our source code into the XML document makes it possible that we can concentrate on designing how our Class should work, without bothering about how it will be represented on the screen, and we can modify our GUI without touching any part of our source code. And this also ensures the integrity of our source code. Now all we need is the cool editor for writing such XML documents and the 'parser' which reads our XML documents and generate expected GUI.
And voilà, OOP XMLPanelEdit Version 1.0!
To make our life easier, I developed 'OOP XMLPanelEdit Version 1.0'(XMLPanelEdit for short), which consists of the editor for such XML documents and the corresponding parser which generates the GUI objects from these XML documents. I also prepared well-designed abstract Classes, which enable us to use 'XMLPanelEdit' without knowing about XML at all.


Read more about XMLPanelEdit and Download... >>

General Information Home

SiteMap

About Us

Privacy Policy

Contact Us

Online Shop



Web Applications for Rent About this service

Web Hosting Account

Web Applications

How to order



For Java Development Apache Jakarta Tomcat

Swing/Servlet by XML

File Upload Servlet/JSP

JDBC on Servlet/JSP

JavaMail/POP3/SMTP

EJB/JOnAS/MySQL

i18n (Shift_JIS,BIG5)

JCE (Java Crypto)/RSA

Archives

Reference

Links


ALL CONTENTS COPYRIGHT 2001, OOP-Reserch. All rights reserved.