help fix a problem with modal windows

J

Jean Lutrin

Hi all,

I'm doing some maintenance/refactoring on a "medium sized" Swing
applications. This application is deployed on several machines,
in an uncontrolled environment. There are quite a lot of annoying
problems with modal windows/frames, amongst other:
- for whatever reason, a modal window appears under the main frame
and the stays blocked until the user someone notice that there's
a window "underneath" is current window
- on some systems using "desktop pager", the modal window sometimes
appears on the wrong "desktop" and the user never gets to see it
(this arrives, for example, it the user switches quickly from one
desktop to another... so it's not a bug of the Swing app, but a "bug"
(call it a feature if you like ;) of the "desktop pager").

The users complaints are, in those two cases, the same : there's a
window open, but they don't see it... So they think the app is blocked
until they, somehow, find where that modal window is.

I don't see it as a bug of the Swing app and it definetely can
happen in an uncontrolled environment because of a "feature" of
the underlying operating system/windowing environment.

So my question is : is it imaginable to conceive a Swing app so that
everytime a modal window pops up, all the other windows gives a
visual clue, indicating that there's a modal windows opened somewhere ?

I was thinking about "greying" automatically all the other windows (I mean,
all the other windows of the Swing application of course, not all the
windows of the other programs the operating systems may be running).
Is it something that can be relatively easy done in Swing ?

(If this can be done, the user would instantly notice that the application
is not blocked nor "frozen" and would get used to the fact that this means
that there's another windows "somewhere" that waits for inputs).

How would you go to implement such a feature in a Swing application ? (I am
not a Swing guru at all) ?

Would it be possible to do something even more descriptive, like both
greying the currently unavaible windows and displaying a message in red saying
something like "This windows is unavailable until you have given
input to the modal windows XXX" ? (say, in an normally invisible JLabel or
whatever ?)

Have you any ideas about a nice, clean way of doing this ?

Thanks in advance,

Jean
 
L

Larry Barowski

Jean Lutrin said:
...
- for whatever reason, a modal window appears under the main frame
and the stays blocked until the user someone notice that there's
a window "underneath" is current window

Is the main frame the parent of the modal dialogs? If not,
making it so should eliminate most of these problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top