A possible solution is:
java.awt.EventQueue.invokeLater(newRunnable(){@Overridepublicvoid run(){
myFrame.toFront();
myFrame.repaint();}});
A possible solution is:
java.awt.EventQueue.invokeLater(newRunnable(){@Overridepublicvoid run(){
myFrame.toFront();
myFrame.repaint();}});