3 Replies Latest reply on Nov 19, 2012 7:58 PM by 935199

    How to temporarily consume or suspend input events to a Swing GUI

      The question first started here, where it was all about suspending the actual EDT: Problem with interrupting the EDT "properly"

      Now that this has proven to be potentially problematic, I'm looking for other ways to block input to a Swing GUI for a set amount of time. The reason I want to do this is to disable the user from manipulating any GUI controls for a second or so while a task that uses them completes, and if it takes longer, pop up a modal progress monitor. More details are given in the topic above.

      One solution would to do mass disabling of all GUI components, but this provides a visual effect that can be problematic for several reasons as discussed in the topic above. Another suggestion was to use the glass pane to consume mouse input events, but accelerators, mnemonics and similar still seem to work, and maintaining dialogs can become problematic.

      Any ideas on how to accomplish this? Thanks!