> For the complete documentation index, see [llms.txt](https://easy-draw.joemazzone.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easy-draw.joemazzone.net/java/module-reference.md).

# Module Reference

Everything you can do with the Java version of Easy Draw (`EasyDraw.java`).

Everything in Easy Draw is inside the `EasyDraw` class:

* Methods are called on the class, like `EasyDraw.loadCanvas()`.
* Shapes are made with `new EasyDraw.ShapeName(...)` and the required values in order, like `new EasyDraw.Circle(centerX, centerY, radius)`.
* Optional properties use setters and getters, like `setColor("red")` and `getRadius()`.

{% content-ref url="/pages/8rZQe9iiCJEpgOffKhLV" %}
[The Drawing Canvas](https://easy-draw.joemazzone.net/java/module-reference/the-drawing-canvas.md)
{% endcontent-ref %}

{% content-ref url="/pages/Vyl4JrYd6YdvcrGGgd5d" %}
[Drawing Shapes](https://easy-draw.joemazzone.net/java/module-reference/drawing-shapes.md)
{% endcontent-ref %}

{% content-ref url="/pages/3KopHUyNWBa8REKEgY43" %}
[Text and Images](https://easy-draw.joemazzone.net/java/module-reference/text-and-images.md)
{% endcontent-ref %}

{% content-ref url="/pages/VGe4gM6J5K2lhlbXFtbY" %}
[Object Methods](https://easy-draw.joemazzone.net/java/module-reference/object-methods.md)
{% endcontent-ref %}

{% content-ref url="/pages/iraFdBKELwRsEfo3xrvb" %}
[Event Handling](https://easy-draw.joemazzone.net/java/module-reference/event-handling.md)
{% endcontent-ref %}

{% content-ref url="/pages/mr8UnfKjRhvp2STZzmd1" %}
[Saving Your Drawing](https://easy-draw.joemazzone.net/java/module-reference/saving-your-drawing.md)
{% endcontent-ref %}

## Coming from the Python version?

The Java version can do everything the Python version can. Here is how they differ:

| Python                                                         | Java                                                    |
| -------------------------------------------------------------- | ------------------------------------------------------- |
| `easy_draw.load_canvas()`                                      | `EasyDraw.loadCanvas()`                                 |
| `easy_draw.Circle(center_xy = (300, 300), radius = 50)`        | `new EasyDraw.Circle(300, 300, 50)`                     |
| `color = "red"` or `color = (255, 0, 0)`                       | `setColor("red")` or `setColor(255, 0, 0)`              |
| `circle.radius`                                                | `circle.getRadius()`                                    |
| `circle.set_property(radius = 80)`                             | `circle.setRadius(80)`                                  |
| `circle.set_property(center_xy = (100, 200))`                  | `circle.setCenter(100, 200)`                            |
| `points_list = [100, 100, 200, 200]`                           | `new EasyDraw.Line(100, 100, 200, 200)`                 |
| `dashes = None` / `border_color = None`                        | `setDashes(0)` / `setBorderColor(null)`                 |
| `def handler(event):` and `event_setup("<Button-1>", handler)` | `eventSetup("<Button-1>", event -> { ... })`            |
| `event.char`                                                   | `event.character`                                       |
| `EasyDrawError`                                                | `EasyDraw.EasyDrawException`                            |
| Files are found next to your program                           | Files are found in the folder you run your program from |

The canvas, [colors](https://easy-draw.joemazzone.net/python/module-reference/colors.md), and event names are the same in both versions.
