Top "Graphics2d" questions

Graphics2D is the part of the Java 2D API related to two-dimensional graphics, text, and imaging capabilities.

Triangle Draw Method

I have trouble drawing a triangle with the draw(Graphics g) method in Java. I can draw a rectangle like …

java swing awt graphics2d
Drawing a simple line graph in Java

In my program I want to draw a simple score line graph. I have a text file and on each …

java swing graphics2d linegraph
Java: Rotating Images

I need to be able to rotate images individually(in java). The only thing I have found so far is …

java image swing rotation graphics2d
Rotate a Java Graphics2D Rectangle?

I have searched everywhere and I just cant find the answer. How do I rotate a Rectangle in java? Here …

java swing rotation graphics2d
Using Graphics2D to overlay text on a BufferedImage and return a BufferedImage

I have checked similarly named questions, but they don't answer this use case. Basically, I was to overlay some text (…

java bufferedimage graphics2d
Can you increase line thickness when using Java Graphics for an applet? I don't believe that BasicStroke works

I am having trouble adjusting line thickness. Can I do that in Graphics or do i have to do it …

java applet awt paint graphics2d
Java Graphics2D transparent background

I have a Graphics2D object and I want to set up the background of the object. It has a …

java background transparency graphics2d
Drawing an object using getGraphics() without extending JFrame

How can I draw an object without a class (which extends JFrame)? I found getGraphics method but it doesnt draw …

java swing graphics2d paintcomponent
Convert a Graphics2D to an Image or BufferedImage

I have a little problem here. I have an applet, where user can "draw" inside it. To do that, I …

java applet bufferedimage graphics2d
Rotating BufferedImage instances

I am having trouble getting a rotated BufferedImage to display. I think the rotation is working just fine, but I …

java swing rotation bufferedimage graphics2d