🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Problems with requestFocus() and requestDefaultFocus()

#11356
From: Alexander Stanev
Date: Tue, 15 Jun 1999 00:00
15 lines
1422 bytes
Hi everyone.
I work with JBuilder2.01 and  JDK1.2.1.  Recenly in my application, I've
tried to set a focus on a particular JButton in my JForm when the form is
creating. But the focus always go to the first added JButoon. Neither
requestDefaultFocus(), nor requestFocus() is working. Default focus is
painted (border around button ) when setDefaultButton() is called, but the
actual focus remains on first added component. I've tried with
FocusManager - focusNextComponent(), setting the next focusable item to be
my desired  Button,  but I've failed again. Maybe I do something wrong? I
don't want to use programmable click on item to get the focus - this is not
a clear decision, but in my case this is a only way to get the focus.
Is this a Swing bug or it's a problem of JBuilder ? Pleace if You know how
to set a focus on a particular item - tell me.

Thank You in advance.
Technical Details
Message-ID: <7k4us1$jms6@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,a26bf9823a51282e,start
X-Google-Attributes: gid111d45,public
From: "Alexander Stanev" <a_stanev@iname.com>
Subject: Problems with requestFocus() and requestDefaultFocus()
Date: 1999/06/15
Message-ID: <7k4us1$jms6@forums.borland.com>
X-Deja-AN: 489752420
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing