aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes entry form has to look exactly like paper form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "entry form has to look exactly like paper form" Watch "entry form has to look exactly like paper form" New topic
Author

entry form has to look exactly like paper form

Fon Drank
Greenhorn

Joined: Feb 20, 2007
Posts: 14
I have a client that is very hung up on creating an electronic version of a government form that looks EXACTLY like the actual paper form. She will not except that all the fields are the same, no, it has to look EXACTLY like what the paper or PDF looks like, down to the last detail. This means I can't use the standard set of Swing tools to do the layout.

I can't just use Adobe Acrobat and do a interactive PDF form, though, because there's alot of functionality I need to incorporate into the form that I can only do with a full-fledged language like Java.

So my question is, what's the best way to handle this? Should I save an image of the form and then incorporate it into a JPanel, and somehow make fixed text fields and check boxes over the actual ones on the form? Is this doable? Or is there some other way to do this?
Nacho Espinosa
Ranch Hand

Joined: Jan 17, 2007
Posts: 30
Hi:

My suggest is that you use jgoodies for good design, jgoodies is flexible for a good design and obtain a look and feel screen similar to windows.

I hope that it help you.


Greetings<br />Nacho Espinosa<br />SCJP 1.4
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I think the very first thing to find out what *exactly* your client means with "exactly". After all, no conversion to a non-paper form could possibly look *exactly* like the paper form - there are probably even subtle differences between different editions of the same paper form itself.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jonathan Janisch
Greenhorn

Joined: Mar 17, 2007
Posts: 24
I don't see why you can't just simply use plain Swing with JLabels and JTextFields.

Here's an example. I did a random google image search for "form".

I found this form:
http://www.crscc.com/oes/rc/appform1of2.jpg

I created the following Swing frame in less than 4 minutes using NetBeans' GUI builder (Matisse).
http://i7.tinypic.com/4gqpj5l.gif

It's not exact since it's just an example, but if I spent another 20 minutes I could make it exact - pixel for pixel. For the inputs, I simply used non-opaque JTextFields with a MatteBorder for the underline effect.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Jonathan Janisch:
if I spent another 20 minutes I could make it exact - pixel for pixel.


I can imagine that you can get it more exact - but whether it's really exact will be in the eye of the client. For example, what if she complains that on her monitor the font size isn't quite correct?

What I'm getting at is that making it "exact" is going to take time, to cost money - the money of your client. To me, it doesn't make sense spending that money to make the form "exact" where it doesn't need to be, and potentially missing those points the client actually cares about.

And I agree that it's probably possible to do all this in pure Swing. Depending on what the client actually wants, there might be other options.
Fon Drank
Greenhorn

Joined: Feb 20, 2007
Posts: 14
The form is very complicated and long, over ten pages, lines everywhere, multiple columns, images, nothing standardized, it's a real mess. It would be a huge hassle to do it with Swing. Furthermore, I don't think I could fit everything on screen without making the font pretty small, so they'll probably complain about wanting to be able to zoom in and out. I don't think it's an easy task to get swing components to 'zoom' like this, especially when there are literally hundreds on a page. Or am I mistaken?
 
Don't get me started about those stupid light bulbs.
 
subject: entry form has to look exactly like paper form