WORKSHOP JAVA 1: PRACTICING

After our first Java Workshop, I did some practicing at home. First, I recreated what we did in the workshop.

Screenshot (15)

Then I played around to see what I would be able to do. So, I ended up creating a rectangle I could draw in. As soon as the mouse leaves the rectangle, it stops drawing circles and once it is clicked, the canvas will clear.

Screenshot (16)

I then added another rectangle, I could draw in. This time I used a smaller rectangle as my “brush”.

Screenshot (19)

But doing that, I ran into a problem. As soon as I would click, both of my rectangle-windows would clear.

Screenshot (21)

So, I tried around a little bit and actually ended up finding a solution. There probably is a better way to do it, but that is what I did:

Screenshot (25)


WORKSHOP JAVA 2: RANDOM CIRCLES

WORKSHOP JAVA 1