checking displayable attr on windows before disposing them

(in an attempt to remove child0 exceptions)
This commit is contained in:
fros4943 2007-03-24 00:44:55 +00:00
parent 24cc50590f
commit 1f1ff5805d
3 changed files with 10 additions and 7 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ContikiMoteTypeDialog.java,v 1.23 2007/03/23 23:45:13 fros4943 Exp $
* $Id: ContikiMoteTypeDialog.java,v 1.24 2007/03/24 00:44:55 fros4943 Exp $
*/
package se.sics.cooja.contikimote;
@ -988,7 +988,7 @@ public class ContikiMoteTypeDialog extends JDialog {
if (compilationThread != null && compilationThread.isAlive()) {
compilationThread.interrupt();
}
if (progressDialog != null && progressDialog.isVisible()) {
if (progressDialog != null && progressDialog.isDisplayable()) {
progressDialog.dispose();
}
}

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ExternalToolsDialog.java,v 1.2 2007/03/22 16:41:50 fros4943 Exp $
* $Id: ExternalToolsDialog.java,v 1.3 2007/03/24 00:44:55 fros4943 Exp $
*/
package se.sics.cooja.dialogs;
@ -187,9 +187,11 @@ public class ExternalToolsDialog extends JDialog {
.trim());
}
GUI.saveExternalToolsUserSettings();
myDialog.dispose();
if (myDialog != null && myDialog.isDisplayable())
myDialog.dispose();
} else if (e.getActionCommand().equals("cancel")) {
myDialog.dispose();
if (myDialog != null && myDialog.isDisplayable())
myDialog.dispose();
} else
logger.debug("Unhandled command: " + e.getActionCommand());
}

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: MantisMoteTypeDialog.java,v 1.4 2007/03/23 23:34:33 fros4943 Exp $
* $Id: MantisMoteTypeDialog.java,v 1.5 2007/03/24 00:44:55 fros4943 Exp $
*/
package se.sics.cooja.mantismote;
@ -361,7 +361,8 @@ public class MantisMoteTypeDialog extends JDialog {
if (compilationThread != null && compilationThread.isAlive()) {
compilationThread.interrupt();
}
progressDialog.dispose();
if (progressDialog != null && progressDialog.isDisplayable())
progressDialog.dispose();
}
});