Adding objects to the canvas fom within the mousePressed() method

You have an unexpected token in your example:

:)

1 Like