I have a problem with my software developped in Java. The user has to write a text in a JtextPane. When there\'s no time left for him to write, a pop-up appears. The only probl
Disabling normal application behaviour (such as manipulation of dialogs with keys) is not a great idea. It confuses a lot of users, who have been groomed to expect certain core functionality in GUIs, plus it can prove a real problem for users with disabilities, who may need to use keyboard navigation in place of a mouse.
I would suggest you consider a different method of telling the user the time is up. Perhaps a banner label appearing on the application somewhere?