不是出错,是说你的程序用到了一些javasdk1.4中
不再建议使用的方法,你用
javac -deprecation xxx.java
就会给出详细的信息

解决方案 »

  1.   

    C:\javaxx>javac -deprecation xxx.java
    error: cannot read: xxx.java
    1 errorC:\javaxx>javac -deprecation Sketch.java
    Sketch.java:57: warning: isFocusTraversable() in java.awt.Component has been dep
    recated
            public boolean isFocusTraversable()
                           ^
    1 warningC:\javaxx>//////////////////////////////////////////////////////////对,出现下面警告。如何解决?请继续指点!先谢过。
      

  2.   

    为何注销这一段居然程序都不能正常退出? /*
    public boolean isFocusTraversable()
    {
    return true;
    }
    */
    请关注!
      

  3.   

    import javax.swing.event.*;
    试试
      

  4.   

    把你的isFocusTraversable()改成isFocusable()试试~祝你好运~
      

  5.   

    to 楼主:我没有看程序(今天感冒,极度不爽)不过你的问题,肯定是用了JDK1.4已经deprecated掉的方法或者属性具体的细节,你查了1.4 API文档后就一清二楚了:)
      

  6.   

    Sketch.java:57: warning: isFocusTraversable() in java.awt.Component has been deprecated
            public boolean isFocusTraversable()
                           ^
    1 warning这里时指在jdk1.4中,java.awt.Component已经不建议使用的了
    下面时从jdk1.4中对此的解释isFocusTraversable
    public boolean isFocusTraversable()Deprecated. As of 1.4, replaced by isFocusable(). Returns whether this Component can become the focus owner. Returns:
    true if this Component is focusable; false otherwise
    Since:
    JDK1.1 
      

  7.   

    to ahbill(阿漂),xhh(霹雳游侠),peacock_king(孔雀王),Patrick_DK(疾风摩郎),zfluo(haha):
         感谢大家抽空为我解答,尤其是Patrick_DK(疾风摩郎)兄[小弟在此祝你早日健复,好人一生平安].