🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to refocus an open (modal==false) jDialog

#427
From: Magnus
Date: Thu, 12 May 2005 16:05
57 lines
3181 bytes
Thanks Lori,

The Alt-tab works fine and is something (in my mind) that can be put 
into the manual as a "global" solution.

For the re-focus issue I will start with a flag that is set true/false 
from the dialog (or any type of window) and tested on before open a new 
window.

I will attack this later in more detail.


Lori M Olson [TeamB] wrote:

> Magnus wrote:
> 
>> Follow up on this issue:
>>
>> I have a main-window that has a button to show all details for a 
>> selected item in a list.
>>
>> The window is defined as: public class ViewDetails extends JDialog {
>>
>> The constructor opens this as modal=true;
>>
>> While testing I had the ViewDetails opened over the main-window when I 
>> selected to clear the desktop (i.e. no windows open). I then clicked 
>> in the bottom toolbar to swap back to application and here is where 
>> the problem occurred:
>>
>> The process came back but the main-window was in front of the 
>> ViewDetail window (that is smaller than the main-window). Since it was 
>> running in modal, I could not move the main-window or get to the 
>> ViewDetail in any way.
>>
>> The way I got around this was to open another window (my browser) and 
>> then the VIewDetail was put in front of the main-window. I minimized 
>> the browser and could continue with my app.
>>
>> Now, I can't write in the manual "if you can't see your window - open 
>> another application and the window will appear ..."
>>
>> Anyone has a solution for this behavior?
>>
> 
> Submarining modal windows are a problem with many Windows applications. 
>  This is not necessarily a Java-specific issue.  I find a lot of install 
> programs do something similar.
> 
> I generally use "Alt-Tab" to find these sorts of "hidden" windows, not 
> opening another application...
> 
> You need to investigate/google focus issues and z-order issues with 
> modal windows/dialogs.  These things tend to be very application 
> specific, so a solution that worked for someone else may not work for 
> your application.
> 
Technical Details
Message-ID: <42837eb3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42669161@newsgroups.borland.com> <42691bc7$1@newsgroups.borland.com> <42837a0d@newsgroups.borland.com> <42837c44$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,96415b146a3c2aed
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 12 May 2005 12:05:25 -0400
From: Magnus <magnus_bjorkman@iwon.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en, sv
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: How to refocus an open (modal==false) jDialog
References: <42669161@newsgroups.borland.com> <42691bc7$1@newsgroups.borland.com> <42837a0d@newsgroups.borland.com> <42837c44$1@newsgroups.borland.com>
In-Reply-To: <42837c44$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.76.179.221
Message-ID: <42837eb3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115913907 67.76.179.221 (12 May 2005 09:05:07 -0700)
Lines: 57
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail