Image of a violet flower Classic Violet

What is it?

Violet is a UML editor with these benefits:

Violet is intended for students, teachers, and authors who need to produce simple UML diagrams quickly. It is not intended as an industrial strength tool. Programs such as Rational Rose, StarUML, ArgoUML, and so on, are fine choices for serious users of UML. However students and casual users may not like them because they are too hard to learn or too expensive. Mike Godfrey coined the slogan: Roses are rational, violets are GNU.

Here are some of the features that industrial-strength UML programs have and that Violet does not have

If you just want to draw simple UML diagrams without too much fuss, chances are you'll like Violet. If you have more serious needs, check out one of the other programs.

A modern version of Violet is developed and maintained by Alex de Pellegrin. Get it from the SourceForge site.

This “classic” version lacks some of the amenities of the modern version such as undo/redo, cut/copy/paste.

My book "Object-Oriented Design & Patterns" discusses the graph editor framework that underlies Violet. I am keeping the classic version around so that students can understand and modify the source code without being overwhelmed.

Downloading and Installation

  1. Violet runs on any platform that has a Java Runtime Environment. If you don't have it, download and install the JDK or the JRE.
  2. Download the JAR file: violet-0.16c.jar
  3. Save the JAR file at a location of your choice. With some browsers, you need to right click (or click and hold) on the link and select "Save file as..." from the context menu. 
  4. Open a command shell and run
    java -jar violet-0.16c.jar
  5. The source code is inside the JAR file. Just unzip it

Java Web Start Version

With Java Web Start, you can try out Violet without installing it. You need to have Java installed. If you don't have it, download and install the JDK or the JRE. Java Web Start needs to be properly configured for your browser. The Java installer should have done this. If not, you need to associate the MIME type application/x-java-jnlp-file with the javaws program in the bin directory of your Java installation.

If Java Web Start is properly configured in your browser, and all planets are aligned properly, clicking jws-launch-button launches Violet. If your browser doesn't support Web Start or the planets aren't aligned, run


Note: The Web Start version is functional and runs safely in the “sandbox”—it can't do anything on your local machine without you agreeing to it. However, the sandbox imposes a few restrictions.

Once you are confident that you like Violet, you should download it and run it locally.

Classic Version Usage Guide

When the program starts, pick a diagram type from the File->New menu. The following types are currently available:

Each diagram window has a diagram-specific toolbar at the top.  The first tool button (with the four "grabbers") is the "Select" tool. 

The other tool buttons let you add nodes and edges to the diagram. Mouse over each node and read the tool tips to see what they do.

You can also right-click or double-click on an empty part of the diagram to get a popup menu with the tools.

A diagram is composed of nodes (for example, classes or objects) and edges (for example, inheritance arrows or call arrows).

To add a node, first click on the matching button, then click anywhere on the diagram to add it.

To connect two nodes with an edge, first select an edge tool. Then click on the first node and hold down the left mouse button. Drag the mouse to the second node and release the mouse button. The edge is inserted between the two nodes.

(There is one exception: You insert a "note connector" simply by dragging from a "note" node. An invisible point node is automatically inserted at the position where you release the mouse button.)

You use the select tool (with the four "grabbers") whenever you want to select an existing object (node or edge) There are three reasons why you would want to do that:

When you edit the properties of a node or edge, a property popup appears. It lists the properties of the objects in a table. Each property has a name and a value.

For example, the Note node has a property whose name is "color" and whose value is a color value. When you edit the value field, the value in the diagram is instantly updated.

When you are done with a diagram, save it with the File->Save or File->Save as menu option. You can give it any name you like, but I recommend you use an extension.violet.

To include a diagram in a document, export to PNG or JPEG format with the File->Export Image option. Here is a sample:

Tip: If you use Violet in a classroom setting, you may want to use the View->Zoom menu option. You can zoom in or out of the diagram. Zooming only affects the diagram display, not the size of saved images.

Tip: If you use Violet on a slow computer, hide the grid. The nodes still snap to the grid, but the drawing is faster.


Thanks to Avi Bercovich, Andrew Brandt, Lars Arne Brekken, Chandler Burgess, Jørgen Cederberg, Robert Colburn, Piyush Devnani, Jeremy Driver, Jay Dunning, Morten Elling, Cris Fuhrman, Igor Garcia, Mark George, Mike Godfrey, Daniel Guerrero, Stefan Gründel, Wee Jin Goh, Laurent Hayoun, Graham King, Peter Kehl, Sebastian Kurt, Raymund J. Lin, Kevin McConnell, Matijs Moest, Tri Nguyen, Evelyn Obaid, Norbert Oertel, Johannes Päivinen, Bill Pine, Bruce Raggett, Zack Rubinstein, Grant Talarico, Jordan Thompson, Simon Tokumine, Jesper Trägårdh, Trygve Utstumo, Glenn Vanmarcke, Sam Watkins, Martin Wehner, Raphael Wimmer, Ed Zaron and (your name might go here) for their help, bug fixes, suggestions for improvement, and code submissions.


Why Violet?

It's the Very Intuitive Object Layout Editing Tool. Also, various violets are the official state flowers of Rhode Island , New Jersey , Wisconsin and Illinois.

Violet is...

Is Anyone Using Violet?

Violet is the first result of the Google search "Easy UML Editor". How cool is that?

Why are the class and object names multi-line text fields and not single-line text?

Often, a diagram looks better when you distribute a class or object name on multiple lines, such as


It is difficult for a program to make an aesthetic judgment, so Violet leaves you in control.

Why are the method and attribute compartments multi-line text fields? In other UML tools, you specify the names, types, and visibilities in a series of dialog boxes. 

Indeed you do, and what a drudgery it is. Select the "Add method" command. Type method name into text field. Type return type into another text field. Click on "public" radio button. Select the "Add parameter" command. Type parameter name into text field. Type parameter type into another text field. Select the "Add parameter" command again...

In Violet, you just type

+foo(x:int, y:int):int

Or, if you prefer


Of course, professional UML tools build up a model of your design, so they need that information. Violet just produces a graph...

How do I move the end of a note connector?

When you insert a node connector, an invisible end point is automatically inserted. You can select it by clicking on the end point of the node line. Then drag it anywhere you like.

How do I make a connection from a node to itself (e.g. a self-call or a class with an association to itself)

Drag a line inside the connector, moving it by a moderate amount. The self-connection will be added. If you don't move the mouse enough, then the connector won't be added. That way, an accidental mouse click won't add unwanted connections.

What are the "HV" and "HVH" bent styles in the property popup for class diagram arrows?

HV = Horizontal, then Vertical. HVH = Horizontal, Vertical, then Horizontal. You may want to vary these if you have too many arrows terminating at one node.

How do I enter bold, italic or underlined text?

Use the HTML <b> , <i> , or <u> tags in the text.

How do I change the font size or color?

Use an HTML tag such as <font size="+1"> or <font color="red">

How do I add a ► symbol to an arrow label?

Use the HTML entity &#9658; in the label text.

How do I make a multi-line arrow label?

Add the HTML tag <br> .

When I try to export an image, I get an OutOfMemoryError.

This can be a problem with large images. The solution is to use the -Xm option to increase the maximum heap size. For example,

java -Xmx256m -jar /home/cay/web/com/violet/violet-0.16a.jar.

This particular invocation gives the Java virtual machine 256MB of heap space, four times its default of 64MB.

What are these object diagrams and the funny curved connector? That doesn't seem to be standard UML

It's not standard UML, but I find these diagrams very handy for showing object references in Java. Here is an example:

The file format looks like some crazy kind of XML. What is it?

Violet uses the "long term bean persistence" feature of JDK 1.4. The file format happens to be XML, but it is not very suitable for interchange of information with other programs.

Is there any design documentation?

Read the book chapter in “Architecture of Open-Source Applications”. This chapter from my Design & Patterns book contains some additional information.