?
Solved

Java paint graphics generator

Posted on 2005-04-24
6
Medium Priority
?
465 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:The_Kingpin08
  • 3
  • 2
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 13855468
Is this the sort of thing you mean?

http://www.oreilly.com/catalog/javanut/examples/
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13855487
Here's another drawing applet:

http://www.stowlake.com/files/draw.html
0
 

Author Comment

by:The_Kingpin08
ID: 13855574
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
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 86

Expert Comment

by:CEHJ
ID: 13855618
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?
0
 

Author Comment

by:The_Kingpin08
ID: 13855657
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
0
 
LVL 15

Accepted Solution

by:
aozarov earned 1500 total points
ID: 13856351
There are many WYSIWYG for generating Java code to create forms, but I don't know of any that can generate code for graphics.
Also, if there was one It would probably not generate the code based on a given image.
Java 1.1 graphics are very simple to use (see this short tutorial to prove it: http://richardbowles.tripod.com/java/guide/graphics.htm)
Going further to the Java2D graphics can be more complex but still not that bad: http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial.html
 
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question