5

I'm looking for a 2D scene graph library for building GUI applications. It should be fast, using Java2D and be compatible with Swing (embeddable in a Swing app and also display Swing components). Support for animations is a plus.

  • Do you have any experience with some of the libraries?
  • Are there any libraries that I have missed?
  • I have to add that I'm not totally offended by a Scala library.

Project Scene Graph

  • seems reasonably fast
  • only GPL (no LGPL)
  • supports animations
  • abandoned 2 years ago
  • as former part of JavaFX it's a Sun product

G

  • dunno whether it's fast
  • LGPL
  • no animations
  • last version Dec 09

Piccolo2D

  • for "zoomable user interfaces"
  • looks like an academic project
  • google code project with high activity
  • BSD licence
  • dunno if it's fast
  • dunno if it does animations

Pulpcore

  • is a game library
  • is targeted at applet deployment (using it as application is hacky)
  • very fast
  • supports animations
  • no development for 2-3 years
  • probably no Swing support at all

jTem

  • part of a bigger project (at first glance)
  • freeBSD license
  • no animation support
  • looks very minimal
ziggystar
  • 28,410
  • 9
  • 72
  • 124
  • What kind of application are you developping ? Is it really important for you to use Java2d ? I ask that because I recently had the same need than you (fast 2D scene lib with embeddable UI components), but ended up using OpenGL and FengGUI (an OpenGL-based toolkit). – barjak Jan 29 '11 at 22:13
  • Well, it's not that I couldn't use 3D. I just want to see how far I can get using only Java2D. The native libraries are my biggest concern about 3D. – ziggystar Jan 29 '11 at 22:53
  • I'm beginning to encounter rendering bugs with project scenegraph. – ziggystar Feb 06 '11 at 11:23

2 Answers2

2

Amino is another one created by Joshua Marinacci. It's very new, but has some interesting features such as CSS skinning, 2D or 3D backends. I am also very much intrigued about its use of an event bus rather than listeners, as that is quite in line with the Scala+Actor stuff I am working on at the moment.

That said, I haven't played with it (yet), so I don't know how good it is.

http://leonardosketch.org/amino

vyadh
  • 21
  • 1
  • 2
2

Piccolo2D, "academic work" or not, is well written. It's somewhat limited but does what it promises (a zoom-able graph) and does it fast. It can be used for at least basic animations such as moving, resizing, color transitions, etc but more can be done as it allows "normal drawing" as well. Has pretty extensive support for events for customization (here the "UI aspect" really shines).

It might be good just to try a few with "mocked" up scene to test for performance/features if this is really believed to be an issue. Piccolo is flexible enough to allow manual management if needed -- e.g. at different zooms display less and/or aggregate objects.

Happy coding.

  • I've ran the examples. Many seem buggy and also they don't look that nice compared to the ones from project scenegraph. – ziggystar Feb 06 '11 at 11:23
  • Piccolo2D is not very fancy and it needs some time to get used with it but the API and the implementation seem to be very solid to me and easy to extend. – Christian May 17 '15 at 18:31