Scan down the page for the link to the isRightMouseButton method or add the parenthetical (java.awt.event.MouseEvent) to the URL (the link above wouldn't include it).
'hope that helps.
--Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ O Time, Strength, Cash, and Patience!
private class MyMouseAdapter extends MouseAdapter
{
MyMouseAdapter (){}
public void mouseClicked(MouseEvent event)
{
if(event.isMetaDown())
{
JOptionPane.showMessageDialog(null,"RIGHT");
}
else
{
JOptionPane.showMessageDialog(null,"LEFT");
}
}
I want to access methods of the clicked JButton such as .setIcon.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.