Changeset 5297 in josm for trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
- Timestamp:
- 2012-06-24T19:14:38+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
r5233 r5297 7 7 import java.awt.Container; 8 8 import java.awt.Image; 9 import java.lang.reflect.InvocationTargetException; 9 10 10 11 import javax.swing.Icon; … … 43 44 } 44 45 } 46 47 public static void runInEDTAndWait(Runnable task) { 48 if (SwingUtilities.isEventDispatchThread()) { 49 task.run(); 50 } else { 51 try { 52 SwingUtilities.invokeAndWait(task); 53 } catch (InterruptedException e) { 54 e.printStackTrace(); 55 } catch (InvocationTargetException e) { 56 e.printStackTrace(); 57 } 58 } 59 } 45 60 46 61 /**
Note:
See TracChangeset
for help on using the changeset viewer.