Discussion Assignment Unit 6
Number of replies: 19
Considering the Java program in section 6.3.3 “Dragging” of Eck (2019), describe what it does in response to specific operations of the mouse (mousePressed, mouseDragged, and mouseReleased), and how it does it.
You are encouraged to run the SimplePaint program for yourself to test its behavior. Then read through the program carefully to understand how that behavior arises.
Your Discussion should be at least 250 words in length, but not more than 750 words
mousePressed - determines that the button was pressed and initializes the fields.
mouseDragged - if the button was previously pressed, changes the coordinates of the object using the current coordinates of the mouse pointer and the coordinates of the object.
mouseReleased - determines that the button has been released and updates the fields
Comments
Leave a comment