🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Control the Focus!

#8514
From: Tor Iver Wilhelmsen
Date: Fri, 11 Aug 2000 00:00
9 lines
847 bytes
"Redarmy" <www@usa> writes:

> my question is how to control the focus.
> whether press the tab or click mouse,the focus shouldn't leave the control
> if its value is null and mandatory is true.

You need to override the isManagingFocus() method to return true - see
how e.g. JTextArea (which, by default, consumes the TAB key for its
own purtposes).
Technical Details
Message-ID: <uwvhop8yn.fsf@sds.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8mtiv3$j6i1@bornews.borland.com> <8n06dj$fjg2@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,712cdc95ee28343
X-Google-Attributes: gid111d45,public
From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no>
Subject: Re: Control the Focus!
Date: 2000/08/11
Message-ID: <uwvhop8yn.fsf@sds.no>
X-Deja-AN: 657065474
Sender: towi@SDSA1761
References: <8mtiv3$j6i1@bornews.borland.com> <8n06dj$fjg2@bornews.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing