Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JOptionPane.showMessageDialog BLOCKS my application when switching to somthing else  RSS feed

Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

this one drives me crazy.

The code below will show the message "msg: 884R, Chcek your account!" when the user log to the system.

THE PROBLEM: say the user activate the application and recieved this message, and then he switches to a different application (e.g, IE) and returns to the application - HE DOESN'T SEE THE MESSAGE, hence, the application is BLOCKED!!! :-(


if (secDB.pendingUsers())
Component c = SwingUtilities.getRoot((Component)e.getSource());
JFrame parentFrame = (JFrame)c; JOptionPane.showMessageDialog(parentFrame, "msg: 884R, Chcek your account!");
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!