🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11125

And again about masking edits

#11125
From: wim.van.leuven
Date: Fri, 09 Jul 1999 00:00
72 lines
4130 bytes
Hello everybody,

I'm posting a question about masking the input through editmasks on
columns, in combination with dbSwing.

I know, them masks again...:-(

As I understand (from the HintsAndTips file) editmasks are not
supported within dbSwing, but the displaymasks from a column are used
to format data when reading and posting from and to a dataset through
the column formatter, which gets instantiated when setting the
displaymask on the column.

We opted for the dbSwing way, because we prefer the Metal L&F above the
Windows L&F, because Swing supports MDI frames, platform independent,
etc.

First problems encountered: because of the efficiency of the
gridcontrol, which is lightweight, we use it to display tables, but it
uses e.g. the wrong selection colors in the Metal L&F. (Circumvented by
adding custom renderers, etc).

We encountered major problems however when trying to edit data through
a dataset: when we have a column for decimal values, set to a precision
of 6 digits with a scale of 3 decimals and a JTextField on this column,
it is POSSIBLE to enter more than 6 digits in the textfield for that
column!! Alas! How is it possible for us to garantee correct data
consistency in this way. Possible solution: display- and editmasks: NOT
SUPPORTED, unfotunatly :-( So, I've tried some things by using the
FieldControl, which is lightweight. First impression: it picks up the
borders and colors from textfields in Swing. OK!! But strange things
happen when editing: double <TAB> to exit a field because of the
itemeditor used as an overlay component; Flickering when exiting the
field; Windows L&F border painting when field has focus, etc. OK, it's
meant to be used in AWT, but why built some parts on swing (borders and
colors) and others not?

So finally, I have turned to the samples directory, to find out how to
correctly built a user interface to edit datasets. Of course, I turned
to the dbSwing example, wich is a rework of a JBCL database sample
project to dbSwing and wich alters display and editmasks through
locales and property files. Major disillusion: a column for
phonenumbers, constrained for input with a display/edit mask: I'm able
to put whatever number i wish into the textfields. No error, no beep,
nothing, zip! A simple text column, with a width of only 30 characters:
I'm able to put more than 30 characters in my edit field! Again, no
error, nothing.

What I'm wondering, how can Borland release a GUI package, intended to
be used in applications which handle datasets loaded and written from
and to a database, if I even can't garantee correct input of my data?

For all clarity, I think JBuilder is a great product! But I'm just
wondering about the future of the dbSwing package! My opinion is that
it's not fit yet to be commercially advised as the way to go in an
application. (See the documentation: what to choose to build GUIs for
an application: JBCL, Swing or dbSwing?) I think I've read something
about this in this newsgroup also: 'Borland is going to abandon JBCL in
the future and is going to use dbSwing instead.' These are not the
exact words, but it was something along these lines. But as I
experienced, dbSwing is not up to the task (yet) to build good database
applications. If I'm mistaking, can anyone shed some light on this
issue, please. The BTeam maybe?

Thanks in advance for any reply.

Wim Van Leuven.



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Technical Details
Message-ID: <7m50u1$bmk$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,142a3a3e0d8edb76,start
X-Google-Attributes: gid111d45,public
From: wim.van.leuven@watco.be
Subject: And again about masking edits
Date: 1999/07/09
Message-ID: <7m50u1$bmk$1@nnrp1.deja.com>
X-Deja-AN: 499091794
X-Http-Proxy: 1.0 x42.deja.com:80 (Squid/1.1.22) for client 193.74.148.91
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Fri Jul 09 14:28:31 1999 GMT
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)