jmusic
Class SwingRunner

java.lang.Object
  extended by jmusic.SwingRunner

public abstract class SwingRunner
extends java.lang.Object

Convenience class to run Runnable objects on the Event Dispatch Thread. This is just a hack to work around Swing's total non-thread-safe-ness.

Author:
steppm

Constructor Summary
SwingRunner()
           
 
Method Summary
static java.lang.Throwable run(java.lang.Runnable r)
          If this thread is the Event Dispatch Thread, simply do r.run().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingRunner

public SwingRunner()
Method Detail

run

public static java.lang.Throwable run(java.lang.Runnable r)
If this thread is the Event Dispatch Thread, simply do r.run(). Otherwise, do SwingUtilities.invokeAndWait(r).