What is the Java equivalent of a C# Graphics object? (more details included)
In a C# Windows form, there is a Graphics object which is used to draw images and shapes directly to the form. What开发者_开发知识库 is the equivalent in Java?
In case my question isn't clear enough, I wish to draw to a form in Java like I would in C#. I am aware of Applets and JApplets, but I want to do this in an actual form and not in a browser.
It's also Graphics in Java. (Surprise!)
Sometimes you need to cast the object to Graphics2D for more advanced graphics manipulations.
The Graphics Class in Java: http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Graphics.html
精彩评论