aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JOptionPane.showMessageDialog  BLOCKS my application when switching to somthing else Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane.showMessageDialog  BLOCKS my application when switching to somthing else" Watch "JOptionPane.showMessageDialog  BLOCKS my application when switching to somthing else" New topic
Author

JOptionPane.showMessageDialog BLOCKS my application when switching to somthing else

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755


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!!! :-(

ANYONE???!?!?!

if (secDB.pendingUsers())
{
Component c = SwingUtilities.getRoot((Component)e.getSource());
JFrame parentFrame = (JFrame)c; JOptionPane.showMessageDialog(parentFrame, "msg: 884R, Chcek your account!");
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOptionPane.showMessageDialog BLOCKS my application when switching to somthing else