Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Modal Window Position?

Reply
Thread Tools

Re: Modal Window Position?

 
 
Neomorph
Guest
Posts: n/a
 
      08-16-2003
On Fri, 15 Aug 2003 20:12:19 GMT, BNM <(E-Mail Removed)> two-finger
typed:

>I am having an issue with modal windows in my Java Application.
>If I go to another application while my Java Application is up with a
>modal window, then return to the Java application by clicking on
>another Window in the Java Application (The modal windows are the
>smallest and thus less likely to be clicked on), my computer just
>beeps at me because it wants me to be in the Modal Window.


Yep. You have to put the focus back on the Modal window, not the
application. In Windows you can do that with Alt-TAB if the modal window
has disappeared behind the application somehow (and the mouse can't reach
it).

This situation also happens with MS Office 2000 on my system. Sometimes the
File Dialog will open behind the main application window, and I have to
Alt-TAB to it to bring it up.

>
>How do I automatically sense that we've returned to the Java
>Application and bring the modal window to the front?


The only way you return to an application is by clicking into it (into the
modal window when it's up).
You can catch that with a FocusListener on the modal window (the
application will not be listening as long as the modal window is active).

>
>*note* Why haven't they fixed this idiot bug in Java yet? This would
>be best handled by the VM rather than forcing us to do a workaround!


It should be properly handled by the operating system (since underneath the
Java classes these are still representative OS windows), but with Microsoft
you have to live with your bugs, because they don't appear to care for
these small nuisances... Have you tried Linux ?

>
>Thanks!
>Brett


Cheers.
 
Reply With Quote
 
 
 
 
Steve W. Jackson
Guest
Posts: n/a
 
      08-20-2003
In article <(E-Mail Removed)>,
Neomorph <(E-Mail Removed)> wrote:

>:On Fri, 15 Aug 2003 20:12:19 GMT, BNM <(E-Mail Removed)> two-finger
>:typed:
>:
>:>I am having an issue with modal windows in my Java Application.
>:>If I go to another application while my Java Application is up with a
>:>modal window, then return to the Java application by clicking on
>:>another Window in the Java Application (The modal windows are the
>:>smallest and thus less likely to be clicked on), my computer just
>:>beeps at me because it wants me to be in the Modal Window.
>:
>:Yep. You have to put the focus back on the Modal window, not the
>:application. In Windows you can do that with Alt-TAB if the modal window
>:has disappeared behind the application somehow (and the mouse can't reach
>:it).
>:
>:This situation also happens with MS Office 2000 on my system. Sometimes the
>:File Dialog will open behind the main application window, and I have to
>:Alt-TAB to it to bring it up.
>:
>:>
>:>How do I automatically sense that we've returned to the Java
>:>Application and bring the modal window to the front?
>:
>:The only way you return to an application is by clicking into it (into the
>:modal window when it's up).
>:You can catch that with a FocusListener on the modal window (the
>:application will not be listening as long as the modal window is active).
>:
>:>
>:>*note* Why haven't they fixed this idiot bug in Java yet? This would
>:>be best handled by the VM rather than forcing us to do a workaround!
>:
>:It should be properly handled by the operating system (since underneath the
>:Java classes these are still representative OS windows), but with Microsoft
>:you have to live with your bugs, because they don't appear to care for
>:these small nuisances... Have you tried Linux ?
>:
>:>
>:>Thanks!
>:>Brett
>:
>:Cheers.


None of this is an issue if you set the modal *dialog* (not window) to
have the correct owner. In my app, which has only a single JFrame, a
modal dialog is given a reference to that frame as its owner. Then,
when I return to my app by clicking some visible portion of the main
frame, I get a beep but I also get an immediate focus shift to the
dialog.
--
Steve W. Jackson
Montgomery, Alabama
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening modal page from modal page Don ASP .Net 0 05-27-2008 11:49 PM
Modal and non modal in same app Leila Java 0 04-26-2005 09:48 PM
How to close a parent modal window when child modal window opens? gopal srinivasan Javascript 0 11-05-2004 05:59 AM
post the form data in modal window and close the modal window. Matt HTML 1 06-01-2004 08:22 PM
post the form data in modal window and close the modal window. Matt Javascript 0 06-01-2004 07:47 PM



Advertisments