I am facing a problem in Javax swing while painting GUI. I am showing a dialog by using SwingUtilities.invokeLater() and some processing is done in background and based upon that I am updating my GUI in background. After the painting and updating in background is complete I remove the dialog. But in the meantime the following exception is coming. One point worth mentioning here is that the problem's frequency is very high on some desktops and very low on some systems.