Article View: borland.public.jbuilder.java.swing
Article #8732Re: How do i give focus to a JTextField
From: Alexis Rios
Date: Tue, 25 Jul 2000 00:00
Date: Tue, 25 Jul 2000 00:00
40 lines
1669 bytes
1669 bytes
Thanks very much :) Joi Ellis <joi@aravox.com> wrote in message news:397DBC81.5C430AB5@aravox.com... > Alexis Rios wrote: > > > > I want to do this in JBuilder > > > > Delphi code: > > > > procedure SetFocus; > > begin > > txtName.setFocus; (* I need something like this in Java *) > > end; > > > > It seems there isn't a method that is able to do that in Java or there is? > > > > Thanks > > Every widget which descends from Swing's JComponent has a method > requestFocus(). > > so, textname.requestFocus() should do it. > > http://java.sun.com/products/jdk/1.2/docs/api/javax/swing/JTextField.html#me thod_summary > > http://java.sun.com/products/jdk/1.2/docs/api/javax/swing/JComponent.html#re questFocus() > > -- > Joi Ellis Software Engineer > Aravox Technologies joi@aravox.com, gyles19@visi.com > > No matter what we think of Linux versus FreeBSD, etc., the one thing I > really like about Linux is that it has Microsoft worried. Anything > that kicks a monopoly in the pants has got to be good for something. > - Chris Johnson
Technical Details
Message-ID:
<397e36fb_1@dnews>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<397db1f1_2@dnews> <397DBC81.5C430AB5@aravox.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,65225accd507e734 X-Google-Attributes: gid111d45,public From: "Alexis Rios" <arios@netzeropr.com> Subject: Re: How do i give focus to a JTextField Date: 2000/07/25 Message-ID: <397e36fb_1@dnews> X-Deja-AN: 650782399 References: <397db1f1_2@dnews> <397DBC81.5C430AB5@aravox.com> X-Trace: 25 Jul 2000 17:55:23 -0800, 63.91.255.177 X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200