Search code examples
javaswingdrawinglwjgljbox2d

Appropriate Drawing Library for JBox2D


I'm programming a JBox2D Application. Until now, I used the Graphics2D and the Swing library to draw JBox2D objects on the screen. But now it's getting difficult because I want to attach images and rotate Objects. If you work also with JBox2D, can you recommend a good Drawing library?

Thanks guys


Solution

  • There is a great and popular Java game library with Box2D integration called LibGDX. LibGDX allows you to develop for the desktop, Android and the browser with the same code base. Their wiki article A Simple Game is a good starting point for setting up the project in Eclipse and drawing something simple on the screen. You can read about their Box2D integration on this wiki page.