Starter Template
To start drawing with Easy Draw, all you need is two method calls inside main. It is that easy!
// Learn how to use Easy Draw!
// https://easy-draw.joemazzone.net/java/module-reference
public class Main {
public static void main(String[] args) {
EasyDraw.loadCanvas(); // Always start your program with this
// --- Your main program below here ---
// --- Your main program ends here ---
EasyDraw.end(); // Always end your program with this
}
}When you run the program above, Easy Draw opens your drawing in your web browser at http://localhost:8765/.
Easy Draw also writes your drawing to an index.html file in the folder you run your program from. Open index.html any time to see your drawing again.
The Java version uses the same Easy Draw page as the Python version:

Features of the Easy Draw page:
Grid - Turns a grid on and off, with a line every 50 pixels and numbers along the top and left side of the canvas.
Coordinates - The bottom-right corner of the page shows the x, y coordinates of your mouse as you move it around the canvas.
Color Picker - Choose a color and the page shows its hex and RGB values to use in your program.
Save Canvas - Downloads your drawing as a PNG file.
A First Drawing
This draws a red square. Click it and it turns 10 degrees.
Was this helpful?