Alex explained that I am looking much better than mine:
You need an existing program that allows you to draw an image, captures what you do when you draw, and record each action as a Java command. when you click on the "Drawl Oval" tool and click on 0,0 and then on 50.50, this will generate the g.drawOval line (0, 0.50, 50).
If anyone knows about such a program, let me know. Thanks.
The original question:
Recently, I have been working with Java and custom drawing using the java.awt.Graphics library, but I find it takes too much time to write manually. Is there a simple graphical editor (e.g. mspaint) that generates source code?
Example:
Drawing: 
Generates:
public void update(Graphics g) { g.translate(0, 0); g.drawOval(0, 0, 50, 50); }
Thanks.
java code-generation graphics
Kevin
source share