home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / SwingUtilities$InvokeComponent.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  1.1 KB  |  36 lines

  1. package com.sun.java.swing;
  2.  
  3. import java.awt.AWTEvent;
  4. import java.awt.Component;
  5.  
  6. class SwingUtilities$InvokeComponent extends Component {
  7.    static final int EventID = 10000;
  8.    Runnable runnable;
  9.    Object lock;
  10.    Exception exception;
  11.  
  12.    SwingUtilities$InvokeComponent(Runnable var1) {
  13.       ((Component)this).enableEvents(10000L);
  14.       this.runnable = var1;
  15.       this.lock = new Object();
  16.    }
  17.  
  18.    protected void processEvent(AWTEvent var1) {
  19.       try {
  20.          this.runnable.run();
  21.       } catch (Exception var6) {
  22.          this.exception = var6;
  23.       }
  24.  
  25.       Object var2 = this.lock;
  26.       synchronized(var2){}
  27.  
  28.       try {
  29.          this.lock.notifyAll();
  30.       } catch (Throwable var5) {
  31.          throw var5;
  32.       }
  33.  
  34.    }
  35. }
  36.