Article View: borland.public.jbuilder.java.swing
Article #8166Re: InputVerifier Dilemas
From: James Cook
Date: Thu, 19 Oct 2000 00:00
Date: Thu, 19 Oct 2000 00:00
38 lines
2178 bytes
2178 bytes
"Tor Iver Wilhelmsen" <tor.wilhelmsen@sds.no> wrote in message news:ubswhpbt3.fsf@sds.no... > "James Cook" <jimcook.remove.for.spam@iname.com> writes: > > > 1. They don't prevent me from clicking on a button, checkbox, or combobox. > > In fact, the behavior is pitiful. First the InputVerifier fires and I get > > notified of a validation problem in my textfield. Then the mouseclick on any > > of the other components gets fired. These components then respond to the > > mouseclick event! What's up with that? True to form, the focus does not > > shift from the textfield, but that is small consolation if you just > > submitted the data, or closed the dialog. > > Have the effect of the button click "hang" on the completion of the > verification. You will have that problem for _all_ event-driven > systems: If you have inter-dependencies on events, you need to use > some sort of flags. But that's the whole purpose of the InputVerifier class. It is perfectly within the Swing architects realm of possibility to consume any outstanding mouse events *before* focus shifts from a JComponent with an InputVerifier. What purpose does the class serve otherwise. it is rendered effectively useless. > > 2. How does one assign an InputVerifier to an *non-editable* JComboBox? Now > > one may argue that there is not a need to make sure that a combobox > > selection needs to be verified, but there are circumstances where two or > > more combos need their selections to jive. > > Why do you need to use that event? Why not evaluate on the > ChangeEvent? For consistency. For focus control. jim
Technical Details
Message-ID:
<39eee503$1_2@dnews>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39eda692$1_2@dnews> <ubswhpbt3.fsf@sds.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,a228099bd5ee00b0 X-Google-Attributes: gid111d45,public From: "James Cook" <jimcook.remove.for.spam@iname.com> Subject: Re: InputVerifier Dilemas Date: 2000/10/19 Message-ID: <39eee503$1_2@dnews> X-Deja-AN: 683369130 References: <39eda692$1_2@dnews> <ubswhpbt3.fsf@sds.no> X-Trace: 19 Oct 2000 05:11:47 -0800, 156.63.133.8 X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400