Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphics2D in Java

Firstly, sorry for this type of question. I´m learning Java programming, I have quite a lot skills in this language, but until now I haven´t used graphics2D. I want to learn how to create graphics, but I haven´t found any helpful tutorial. Please, do you know some good tutorial about learning how to create graphics? Thanks in advance.

like image 202
Tom11 Avatar asked Jun 27 '26 23:06

Tom11


2 Answers

It depends by what you mean by Graphics2D. This covers a large area, from painting custom components to painting games and/or animation

I'd start with something like 2D Graphics Trail

I'd make sure your familiar with Custom Painting in Swing

I'd also make myself familiar with Painting in AWT and Swing

Once that begins to make scene, you'd take a look at Concurrency in Swing because eventually you want to use Threads. Pay close attention to the Event Dispatching Thread topic

like image 51
MadProgrammer Avatar answered Jun 30 '26 11:06

MadProgrammer


Java How To Program 9/e (early objects) has some very nice introduction to Java's graphics.

At each chapter there is a Case Study where you are introduced to different graphics java features and also there are exercises which are very challenging.

Then, later there is the Graphics and Java 2D chapter (chapter 15) where there is a very nice cover of Java's 2D graphics.

Then if you want to go deeper into Java's 2D Graphics, you can browse through the Java 2D API Specification

like image 43
cprogcr Avatar answered Jun 30 '26 11:06

cprogcr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!