这是编译提示不用改应该能运行呀.
Note: battery.java uses or overrides a deprecated API.
你使用了已经不再建议的Api

解决方案 »

  1.   

    postEvent(new Event(this,Event.MOUSE_DRAG,this.name+id));
    好像用了这个不推荐deprecated 的API

      public boolean mouseDrag(Event evt,int x,int y)public boolean mouseUp(Event evt,int x,int y)
    这个需要实现MouseMotion接口之类吧这个是通告,如果可以运行就用不推荐的API,不引响程序运行,不理它之
      

  2.   

    已经说的很清楚了
    这样编译
    c:\shiyan>javac -deprecation dbattery.java
      

  3.   

    public boolean mouseDrag(Event evt,int x,int y) Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent)
    you need replace by processMouseMotionEvent(MouseEvent)!
    and you can ignore this warning!