C:\jdk\bin>javac Revolve.java
Revolve.java:46: Exception java.lang.InterruptedException must be caught, or i
must be declared in the throws clause of this method.
     try {Thread.sleep(10000); }
                      ^
Revolve.java:47: Class InterrupterException not found in type declaration.
     catch(InterrupterException e) {}异常写错了
应该是InterruptedException

解决方案 »

  1.   

    你把:InterruptedException
    写成:InterrupterException
    了。请看你的代码:
    public void run () {
       while(true) {
          repaint();
          current++;
          if(current>2)
               current=0;
         try {Thread.sleep(10000); }
         catch(InterrupterException e) {}//这里,嘿嘿
    }
      

  2.   

    runner.stop();
    要扑捉异常
    try{
    runner.stop();}catch(Exception e){
    }
      

  3.   

    try {Thread.sleep(10000); }
         catch(Exception e) {}/