I have a module suite project in which I am trying to find a way to "lock" my
application after a certain period of time. To accomplish this, I am using
the main window's glass pane to consume mouse and keyboard input. But when I
have a modal dialog open, the glass pane opens under the dialog. I know that
I could set the modal dialog's glass pane visible, but that is not quite
what I want - I need to display a painted glass pane over the entire main
window. Anyone know of a way to do this?
You should be able to do this using the Layered Pane, but what happens when the dialog is visible outside the bounds of the frame?
If you want to make your application unusable, it's probably best to indicate this in the way the GUI looks as well, otherwise it will seem the application has crashed. Simply disable the frame and the dialogs using setEnabled(false).
Another way you could do this is create a modal dialog, which says that the program has locked. If you close the modal dialog, you could make the entire application exit.
What is it exactly that you want to achieve, and why? There are several ways to do it, but some are more suitable than others.
The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Joined: Sep 27, 2010
sorry for the late reply....
actually i miss-understood my projects requirement and trying the things in a wrong way........
my requirement is to display an animated glass pane which consumes all events for a certain period...
but the glasspane should be on top of dailogs also....
please suggest me a way to do achieve this....