[Lutinutil-commits] r804 - trunk/lutinutil/src/java/org/codelutin/log
Author: thimel Date: 2008-06-30 18:37:00 +0000 (Mon, 30 Jun 2008) New Revision: 804 Modified: trunk/lutinutil/src/java/org/codelutin/log/LutinLog.java Log: Disabled frame if display not available Modified: trunk/lutinutil/src/java/org/codelutin/log/LutinLog.java =================================================================== --- trunk/lutinutil/src/java/org/codelutin/log/LutinLog.java 2008-06-30 18:09:07 UTC (rev 803) +++ trunk/lutinutil/src/java/org/codelutin/log/LutinLog.java 2008-06-30 18:37:00 UTC (rev 804) @@ -32,6 +32,7 @@ package org.codelutin.log; import java.awt.Component; +import java.awt.HeadlessException; import java.util.TimerTask; import javax.swing.SwingUtilities; @@ -61,7 +62,9 @@ public void run() { if (SwingUtilities.isEventDispatchThread()) { Component frame = getProgressMonitorFrame(); - frame.setVisible(true); + if (frame != null) { + frame.setVisible(true); + } } else { SwingUtilities.invokeLater(this); } @@ -170,7 +173,11 @@ */ protected Component getProgressMonitorFrame() { if (progressMonitorFrame == null) { - progressMonitorFrame = new ProgressMonitorFrame(this, null); + try { + progressMonitorFrame = new ProgressMonitorFrame(this, null); + } catch (HeadlessException he) { + //Unable to create frame + } } return progressMonitorFrame; }
participants (1)
-
thimel@users.labs.libre-entreprise.org