XFA Forms Vs Swing Forms

I thought of sharing some interesting information regarding XFA Forms and places where consideration has to be taken when you attempt to convert XFA forms into Java based swing components. Please read this article on XFA Components and Structure to help grasp the basic structure of XFA.

1. TextEdit field in XFA:

The XFA Text Edit field behaves very similar to the JTextField in swing, At the same time TextEdit may also function as swing text area. “MultiLine” attribute in TextEdit node decides whether the text field has to be text area or not. As I mentioned in my previous article on XFA structure, Field objects can also be designed to be dynamic. Dynamically designed TextField’s height is expandable to room data contents.

2.  Other TextFields

XFA forms contains NumericEdit, DateTimeEdit, PasswordEdit and customized text components in addition to TextEdit, These components can be built using the same JTextField in swing and regular expressions need to be used to ensure data input.

3. Radio Buttons

Unlike swing radio buttons the appearance of XFA radio buttons can be either round or box, It is worth investigating “ExclGroup” tag before deciding swing form allocation. (Ususally radio buttons are created inside ExclGroup tag). Name of ExclGroup can be utilized to name the group of radio buttons if it accommodated under ExclGroup.

4. ChoiceList

ChoiceList options are defined either in “Field” node or JavaScript. If the options are defined in Field node then it is in the form of a Key – Value.

5. Captions

Most of the field components may have a caption which acts as JLabel but is a part of Form. The location of caption is not stick to one place and may vary.

6. ImageEdit (Image Field) and Signature field

Both the fields mentioned above act similar to file upload in Swing.

I believe this information may useful for you prior to making any design decisions from XFA to swing components.

This post is part of our “XFA Articles Index” in these articles, we aim to help you understand XFA.

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (Twitter, Facebook and Google+) or the Blog RSS.

The following two tabs change content below.

suda

Java EE developer at IDRSolutions
Suda is the Senior Java EE Developer at IDR Solutions, and specialises in XFA, Fonts, True-Type Fonts, application servers and conversions. He is a keen science-fiction fan in his spare time.

Related Posts:

suda

About suda

Suda is the Senior Java EE Developer at IDR Solutions, and specialises in XFA, Fonts, True-Type Fonts, application servers and conversions. He is a keen science-fiction fan in his spare time.

One thought on “XFA Forms Vs Swing Forms

  1. pavankumar

    Than x for giving this information…!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>