boolean left=false; //左键是否被按下,按下为true
boolean rigth=false; //右键是否被按下,按下为true
if (e.getButton() == e.BUTTON1)
left=!left;
if (e.getButton() == e.BUTTON3)
right=!right;
if (left && right)
{
 coding...
left=false;
right=false;
}
以上是我的做法,有没有更好点的方法?
我觉得自己的方法不太完美