Disable key-pressing in MessageDialog

后端 未结 1 1607
余生分开走
余生分开走 2021-01-27 07:52

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

相关标签:
1条回答
  • 2021-01-27 08:18

    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?

    0 讨论(0)
提交回复
热议问题