wondering what is the major difference between these two: 开发者_运维百科onClick and mouseClick..
Looks like you are confusing Java with Javascript. There is not onClick() method on Java APIs.
Assuming that you're talking about Java, the difference is right there in the documentation for MouseEvent:
Mouse Events
* a mouse button is pressed * a mouse button is released * a mouse button is clicked (pressed and released) * the mouse cursor enters the unobscured part of component's geometry * the mouse cursor exits the unobscured part of component's geometry
If you're talking about JavaScript, I'm going to assume that it's the difference between old style and new style event handling. But I've only ever used onClick, so can't give a definitive answer.
精彩评论