to 楼主:我没有看程序(今天感冒,极度不爽)不过你的问题,肯定是用了JDK1.4已经deprecated掉的方法或者属性具体的细节,你查了1.4 API文档后就一清二楚了:)
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
to ahbill(阿漂),xhh(霹雳游侠),peacock_king(孔雀王),Patrick_DK(疾风摩郎),zfluo(haha): 感谢大家抽空为我解答,尤其是Patrick_DK(疾风摩郎)兄[小弟在此祝你早日健复,好人一生平安].
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>//////////////////////////////////////////////////////////对,出现下面警告。如何解决?请继续指点!先谢过。
public boolean isFocusTraversable()
{
return true;
}
*/
请关注!
试试
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
感谢大家抽空为我解答,尤其是Patrick_DK(疾风摩郎)兄[小弟在此祝你早日健复,好人一生平安].