Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best API for simple 2D graphics with Java [closed]

I'm not sure what the best api for simple 2d graphics with Java is. I know java.awt.Graphics2D was the standard but has it been replaced? Swing is the new API for Java GUI apps but it seems a bit heavy for what I want. What I really want is something like the C SDL library.

like image 487
bjwbell Avatar asked Oct 16 '08 09:10

bjwbell


2 Answers

Java 2D (Graphics2D and friends) is indeed the best choice that I know of. Swing is actually implemented on top of Java 2D, so yes, if you want non-GUI-type graphics, Java 2D is the way to go.

like image 82
Chris Jester-Young Avatar answered Sep 24 '22 16:09

Chris Jester-Young


If you want to have the least work possible if you're building a game (or even if not) use http://slick.cokeandcode.com/

UPDATE: The link has since changed to http://slick.ninjacave.com/

like image 33
i30817 Avatar answered Sep 24 '22 16:09

i30817