🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Is requestFocus() allowed in a JDialog?

#11551
From: Matt Krevs
Date: Wed, 05 May 1999 00:00
20 lines
1374 bytes
Yes its possible but I think you need to call
wingUtilities.invokeLater( thread that sets focus ). Basically the
requestFocus() call needs to be the last thing that happens.

I remember this issue being addressed previously on this forum. Have a
search on dejanews

Paul Waldo <pwaldo@bellatlantic.net> wrote in message
news:372F4C8B.95E9445F@bellatlantic.net...
> Hi all,
>
> I'm using Borland's JDK 1.1.6 and I am having difficulty setting the
> focus in a JDialog.  I traced into the requestFocus call, and saw that
> the component must be visible, so just for fun I made the dialog
> non-modal and called requestFocus after calling setVisible(true).  It
> still doesn't work.  Is it possible to set the focus within a JDialog?
> TIA
>
> Paul
>
Technical Details
Message-ID: <7gnsj2$7ta16@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <372F4C8B.95E9445F@bellatlantic.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,bd6111645722c068
X-Google-Attributes: gid111d45,public
From: "Matt Krevs" <mattkrevs@flex.com.au>
Subject: Re: Is requestFocus() allowed in a JDialog?
Date: 1999/05/05
Message-ID: <7gnsj2$7ta16@forums.borland.com>
X-Deja-AN: 474089980
References: <372F4C8B.95E9445F@bellatlantic.net>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Reply-To: "Matt Krevs" <mattkrevs@flex.com.au>
Newsgroups: borland.public.jbuilder.java.swing