Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+37 votes

Like in Paint ?

asked in CSC285_Fall2018 by (1 point)

1 Answer

+20 votes
 
Best answer

(Im assuming you might want to use javafx)
First you need to create a canvas object and a graphics object, add an event handler to it that maybe passes the necessary parameter to handle the event. then override the handle method for it to stroke a line from x,y to x,y. (maybe a stroke method). You also have to previously set the scene to display and the stroke and so and so.

answered by (1 point)
selected by
...