Article View: borland.public.jbuilder.java.swing
Article #7474Modal Dialog Question
From: James A. Schulz
Date: Tue, 23 Jan 2001 20:42
Date: Tue, 23 Jan 2001 20:42
22 lines
1862 bytes
1862 bytes
I have a Swing applet with only one text field. After the user enters something into that field and presses ENTER, the field is temporarily disabled while an animation is displayed. Once the animation is finished, the text field is enabled again, and new input can be entered. All this works fine. Today, I tried adding a modal dialog to the code that runs the animation (Proceed: Yes, No?). The dialog appears when it is called and functions as it should. However, when the animation concludes, thefocus does not return to my text field (as it did before I added the dialog). I have tried adding calls to myTextField.requestFocus() in various places, but nothing has worked. Interestingly, this problem is not apparent when I use the Sun applet runner in the JB4 IDE. It only shows up when I run the app (outside of the IDE) in my browser (IE5). Any suggestions as to how I can get the focus back where it belongs? thanks, James
Technical Details
Message-ID:
<94kqc4$s7e11@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!130.59.211.10.MISMATCH!merapi!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9689d31b5f478856,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-23 12:46:29 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!130.59.211.10.MISMATCH!merapi!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!not-for-mail From: "James A. Schulz" <jaschulz@wiseware.com> Newsgroups: borland.public.jbuilder.java.swing Subject: Modal Dialog Question Date: Tue, 23 Jan 2001 14:42:46 -0600 Organization: Another Netscape Collabra Server User Lines: 24 Message-ID: <94kqc4$s7e11@bornews.inprise.com> Reply-To: "James A. Schulz" <jaschulz@wiseware.com> NNTP-Posting-Host: user-vcautgu.dsl.mindspring.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200