Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+11 votes
asked in CSC212_Spring2019 by (8 points)

2 Answers

+6 votes

In the program directions, we are told that MouseEvent.BUTTON1 is for a left click and MouseEvent.BUTTON3 is for a right click. So you check if your source is equal to MouseEvent.BUTTON1 or MouseEvent.BUTTON3. So you use event.getButton() to get the source.

answered by (8 points)
+1

Also, MouseEvent.BUTTON2 is the middle click.

+1 vote

You can use mouse event buttons and number them.

answered by (650 points)
...