This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem of focus in JOptionPane  RSS feed

Mehdi Aboulkassim
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hye every one,

I have a application that uses a JOptionPane, and I`ve added mnemonics to some buttons.
The problem is that when a JOptionPane message appears, and after clicking in the Yes button, the mnemonics are like desabled (I think that the JOptionPane steals the focus).

I`ve tried the following:

int response = JOptionPane.showYesNoMessage(.....);

if(response == JOptionPane.OK_OPTION){

It does work but I`m looking for a general solution because I`ve override the JOptionPane class and I use it in lots of other classes.

Thanks for your help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!