This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I'm trying to use Graphics2D, and I need to add plugins to my basic Eclipse program. I've downloaded the plugins and saved them in my base "Eclipse/plugins" folder. But I cannot find them from Eclipse itself -- I get no "add plugins" option. What am I missing?
Maneesh: Thanks for responding. Yes, I'm trying to use Graphics2D. My Eclipse-JAVA code, incorporating Graphics2D elements, seems to compile. But no graphics are created. I figured that I'm missing something in Eclipse, so I downloaded the "Java2D for Eclipse" plugin from sourceforge.net/projects/holongate. I think the original JAVA code was written by "holongate" in the early 2000's. But I can't get Eclipse to recognize the plugin. Two questions: Do I need the plugin for Graphics2D; and How to I force plugins in Eclipse?
This is a bit confusing for me.
Usually Graphics/2D are used for custom painting on the screen (e.g. gradient painting) http://oreilly.com/catalog/java2d/chapter/ch04.html Can you explain a bit more on what you mean by "But no graphics are created."
Please post some SSCCE with a brief note on what you are trying to achieve
Let me answer your "what are you trying to do" question. I want to write JAVA code (using Eclipse) to create "Gen Art" = abstract art generated by computer. I've had some success using Graphics 1D, but now I need more. It's not clear (to me) if the latest Eclipse JAVA download contains everything I need for Graphics2D. I seem to have a version of JDK1.7, not JDK 2.0.
My entire code is rather long. I tried to attach it, but got error messages because my files had .txt ot .java extensions. The fragment below shows where I expect Graphics2D to draw & fill an irregular figure. I've printed out the x_values & y_values vectors and they are filled with correct (double) values. But nothing gets drawn on the computer monitor. A subsequent problem: how to save the filled image to a file -- using buffers.