Article View: borland.public.jbuilder.java.swing
Article #10967Re: Swing JTextField: Focus-Lost-Problem
From: CV
Date: Thu, 22 Jul 1999 00:00
Date: Thu, 22 Jul 1999 00:00
26 lines
1311 bytes
1311 bytes
See http://www.codeguru.com/java/articles/445.shtml -CV Robert Schossleitner wrote: > Hi, > > in my application I have a JTextField in which a timevalue can be entered. > This timestring hat to be checked on leaving the field (by pressing the > TAB or Enter-Key). If the format can not be converted, the focus > should not be handed over to the next contol. > > The only way i found to prevent the focus to be changed is throwing a > runtime-exception in the focusLost-Event-Procedure (a consume of the > Focus-Event is not alowed. > The Exception causes the hiding of the caret but the focus stays in the > first field. > > Does anybody know a better way to solve this problem? > > greetings > > Robert
Technical Details
Message-ID:
<3797B102.3CE24CD8@guest.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7mv4v6$esf10@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,d9e76987c762ed78 X-Google-Attributes: gid111d45,public From: CV <guest@guest.com> Subject: Re: Swing JTextField: Focus-Lost-Problem Date: 1999/07/22 Message-ID: <3797B102.3CE24CD8@guest.com> X-Deja-AN: 504205176 Content-Transfer-Encoding: 7bit References: <7mv4v6$esf10@forums.borland.com> To: Robert Schossleitner <srro@ams.stiwa.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing