日期:2014-05-20  浏览次数:20727 次

在处理鼠标事件发生的问题
请问发生以下错误时,一般是什么问题?

Multiple markers at this line
- The type drawline.handle must implement the inherited abstract method 
MouseMotionListener.mouseMoved(MouseEvent)
- The serializable class handle does not declare a static final serialVersionUID field of type long
- The type drawline.handle must implement the inherited abstract method MouseListener.mouseClicked(MouseEvent)

------解决方案--------------------
问题说的挺清楚的:
- The type drawline.handle must implement the inherited abstract method
MouseMotionListener.mouseMoved(MouseEvent)
- 类型drawline.handle必须实现继承的抽象方法MouseMotionListener.mouseMoved(MouseEvent)
说明:类型drawline.handle的祖先有个抽象方法MouseMotionListener.mouseMoved(MouseEvent),还没有实现,就想实例化这个类导致的。

- The serializable class handle does not declare a static final serialVersionUID field of type long
- 可序列化类句柄未声明一个long类型的static final serialVersionUID 成员(那就声明一个呗)

- The type drawline.handle must implement the inherited abstract method MouseListener.mouseClicked(MouseEvent)
- 与问题1类似