Create an app in which, as the user moves the mouse cursor around the window, a Circle

Question:

Create an app in which, as the user moves the mouse cursor around the window, a Circle and Polyline follow the cursor. The app should appear as shown in Fig. 22.18 . There should always be a Circle centered at the current mouse-cursor location, and that location should also be the first point in the Polyline. As you respond to each mouse-move event, use the mouse cursor’s location as the Circle’s new center and insert that location at the beginning of the Polyline’s points collection. The Polyline’s length should not increase forever—once the Polyline reaches 50 points, remove the last point each time you insert a new first point.

Fig. 22.18

image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: