Archived

This topic is now archived and is closed to further replies.

pcvsee

[java] mouse events

Recommended Posts

how do you check if a certain mouse button was pressed or clicked? for example, how will i know if the right mouse button was clicked?

Share this post


Link to post
Share on other sites
this.addMouseListener(new java.awt.event.MouseAdapter()
{
public void mousePressed(MouseEvent e)
{
if (e.isMetaDown())
System.out.println("Right Click");
}
});

''this'' is an applet

Share this post


Link to post
Share on other sites