tags:

views:

956

answers:

7

Perhaps a philosophical question. I’ve seen some interesting visuals lately in GUIs, mostly on native platform APIs. I know that “it’s just software” and that likely, with enough work, anything can be done with pixels. The question is (finally!), is Java really an option for doing fancy things with a GUI. Seems like a silly thing I guess, but I kind of like some of the Windows Presentation Foundation work. I don’t see a consolidated effort like this for Java. Where should I look?

+8  A: 

Take a look at JavaFX.

JRL
+1 JavaFX is superb
WolfmanDragon
I've heard some people say that it may not survive the Oracle takeover. Don't know if there is any truth to that, but it certainly makes me hesitant to pick up the framework. Then again, isn't it open source?
James McMahon
I would be more worried about Swing surviving the Oracle takeover. What I mean is that there wouldn't be significant effort in continuing to improve Swing. JavaFX was sucking up all the oxygen before the Oracle takeover, and it remains to be seen if they will continue that trend, but there won't be as much room for the sentimental during the takeover.
Yishai
JavaFX is not open source (parts are but close only counts in horseshoes). But SWT and Swing (various implementations) are fully open source. As for what Oracle will do to JavaFX, way to soon to say.
Matthew Flaschen
+3  A: 

There has been some advancements in the GUI front in Java.

For example, beginning from Java 6 Update 10, it is possible to make transparent and shaped windows (i.e. arbitrarily-shaped windows commonly seen in media players) in Java:

How to Create Translucent and Shaped Windows

Filthy Rich Clients: Developing Animated and Graphical Effects for Desktop Java Applications by Chet Haase and Romain Guy is a good book full of tips on making advanced GUIs in Swing.

coobird
+2  A: 

If you like a powerful GUI and don't mind it not being entirely Java-y, obviously check out the Standard Widget Toolkit.

Matthew Flaschen
+1  A: 

'Consolidated' and 'Java' usually don't go together, But aside from that there is Pivot, Thinlet, Swing, and SWT .. and many others . So I think the answer is: Yes there are.

Scott Evernden
+1  A: 

The only limitations for Java (on some platforms) is the seamless integration between the JVM and the host OS ui frameworks (think drag drop, etc.).

Beyond that, what is it that you want to do that you think Java will not be able to handle?

https://appframework.dev.java.net/

I think the questioner is saying that one of the issues with Java GUIs is that they really don't blend well with the host OS.
James McMahon
+1  A: 

Having done major Swing development in Java, I would say that if Windows only is what you want, I would think very hard about what advantage Java gives you over .NET to make it worth the hastle. Yes, ultimately you can get it done. There is some great software out there that shows it can be done. It is not easy. At all.

But if you want to do Windows GUI development, at the end of the day Java will just get in your way. Want to interact with a Windows service (like Desktop Search, just to pick an example)? Very hard to do.

On the other hand, if you need your software to be platform independent, that is a completely different ballgame.

JavaFX is very promising, but it is very new. Many of the things that you kind of expect to be there, just aren't yet, for the boring business applications anyway. If you are writing a game, that is a little different.

Yishai
+2  A: 

The book Filthy Rich Clients covers many advanced rendering and animation techniques in Swing and Java2d. It may be worth a look if JavaFX is not an option.

Dave Ray