Article View: borland.public.jbuilder.java.swing
Article #11047How to interrupt focus events
From: CV
Date: Wed, 21 Jul 1999 00:00
Date: Wed, 21 Jul 1999 00:00
24 lines
1448 bytes
1448 bytes
I'm writing a field-level validation function for JTextField components. The JTextField components are placed inside a JPanel container. When the JTextField is created, the programmer specifies the initial integer value, upper bound, and lower bound on this component. At runtime, the user can change the initial value. When focus is lost on this component, I validate whether or not the value in the component is within range. If not within range, I display a JOptionPane saying, "hey, your value is out of range". ---> What I want to do is return focus back to the component whose value is out of range. However, in my travels I am finding that I can neither 1) Interrupt the "focus_gained" event on the next component in the JPanel, nor 2) Return focus back to the component whose value was out of range. Any ideas? -Chris Vinson 408 577 2231 If replying to me, please change the "TO" string to VinsonCL@PE-Nelson.com (not guest@guest.com)
Technical Details
Message-ID:
<37960FC5.7AEF2343@guest.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,fbc5c4bd436d4432,start X-Google-Attributes: gid111d45,public From: CV <guest@guest.com> Subject: How to interrupt focus events Date: 1999/07/21 Message-ID: <37960FC5.7AEF2343@guest.com> X-Deja-AN: 503627224 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing