当前位置: 代码迷 >> J2SE >> 在处理鼠标事件发生的有关问题
  详细解决方案

在处理鼠标事件发生的有关问题

热度:36   发布时间:2016-04-24 02:10:45.0
在处理鼠标事件发生的问题
请问发生以下错误时,一般是什么问题?

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类似
  相关解决方案