🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problem Controling Focus

#7736
From: Torsten Welches
Date: Fri, 05 Jan 2001 21:36
25 lines
1611 bytes
Nathan,

check JComponent.setInputVerifier. An InputVerifier does exactly what you
want, including preventing focus movement in case the verification failed.

Good luck,
Torsten


Nathan Bagby schrieb in Nachricht <3A5605DB.9D4F3AAB@nasirc.nasa.gov>...
>Dear Group:
>
>I am writing an applet GUI that accepts a great deal of user input and
>therefore requires a great deal of validation. My validation methods
>work fine in JBuilder 4.0 but when I run the applet in Netscape enter
>incorrect data, such as a bad date, the component.requestFocus() call
>fails and the next component gains focus. I obviously want focus to
>remain on the component where the incorrect data was entered so that the
>
>user can correct it.
>
>Any help much appreciated!
>
>Nathan
>
Technical Details
Message-ID: <3a563efc_1@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.online.be!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!bornews.borland.com!dnews!194.8.195.24
References: <3A5605DB.9D4F3AAB@nasirc.nasa.gov>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,d8a7625108df7ca1
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2001-01-05 13:40:03 PST
From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Newsgroups: borland.public.jbuilder.java.swing
References: <3A5605DB.9D4F3AAB@nasirc.nasa.gov>
Subject: Re: Problem Controling Focus
Date: Fri, 5 Jan 2001 22:36:36 +0100
Lines: 27
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
NNTP-Posting-Host: 194.8.195.24
Message-ID: <3a563efc_1@dnews>
X-Trace: 5 Jan 2001 13:39:08 -0800, 194.8.195.24
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.online.be!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!bornews.borland.com!dnews!194.8.195.24