Java – Java’s answer to WPF?


I'm mostly a .Net person at the moment, but I've been playing with Java some lately– exploring what's out there.

Now I'm looking for the Java equivalent for WPF. I know I could find an OpenGL library or two out there, but that's not really as rich or simple as the WPF system.

Best Answer

I think a combination of JavaFX, Swing, Java2D, and Java's browser-based JRE comprise the solutions that WPF provides:

  • JavaFX applications (actually, any Java app) can run in the browser or on a desktop
  • JavaFX provides high-end video support
  • JavaFX provides for scripted animations and visual special effects
  • Swing provides UI capabilities, and can be used in both Java and JavaFX
  • Java2D, which provides the underpinnings for all drawing tasks (including Swing), takes advantage of hardware acceleration and DirectX support
  • The JRE on the desktop or the browser enable Java applications to be deployed to multiple environments (including other screens, like set-top boxes or phones)