Link to home
Start Free TrialLog in
Avatar of The_Kingpin08
The_Kingpin08

asked on

Java paint graphics generator

Hi everybody,

I'm currently working with applet and needs to make a lot of graphics, so I just wanted to know if anyone had a porgram that let the user paints and then generates the code of the graphics.

Thanks for your help,

Frank
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Is this the sort of thing you mean?

http://www.oreilly.com/catalog/javanut/examples/
Here's another drawing applet:

http://www.stowlake.com/files/draw.html
Avatar of The_Kingpin08
The_Kingpin08

ASKER

This is kind of what I'm looking for, except that when I have made all my graphics, I'd like to be given the code of those graphics...

ie. If I draw 4 rectangles and a circle, I'd like to have something like:

g.drawRect(10, 90, 150, 100);
g.drawRect(40, 120, 150, 100);
g.drawRect(70, 150, 150, 100);
g.drawRect(100, 1800, 150, 100);
g.drawOval(180, 20, 260, 80);

[...]


Thanks, Frank
You need to save each Shape into a collection each time drawing takes place. Can you just post the part of your code where that happens?
well I haven't done anything yet...

When I did some Java back in college, I use to have a small application that would let me draw some shape and generate the Applet code once I was done. That's exactly what I would need, since I would have all my shapes already and would only have to add some code.

Don't know if I'm being clear, but I'm looking for a way to avoid losing time with the graphics...

Thanks, Frank
ASKER CERTIFIED SOLUTION
Avatar of aozarov
aozarov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial