freezing when poping a JOptionPane in a picking method

Hi there,

I have a picking method in my application (called by the display method of the GLEventListener)
This methods is supposed to do some operations, or display a WarningMessage in a JOptionPane if the operation in invalid.

but the JOptionPane.showMessage() freeze the application when called from the same thread that display

do you have a solution ? (using SwingWorker or something else)

Thanks

Try


SwingUtilities.invokeLater( new Runnable() 
{
   // display dialog
} );

that was so obvious that i didn’t though of it ! ;D

Thanks a lot bleg :smiley: