Dear Daddy Warbucks

by Robert Cooper

Romain is pimping the pimping of Swing apps. Of course, I have to pick at him:

It looks bad by default. You have to change it to [get] a good-looking application. Swing makes that really easy. You can override everything, the behaviors, the feel, you can change the look.

You have the powerful Java2D API [that] gives you all the drawing tools you need to create very rich user interfaces, with animation and nice effects. It's the same technology we see in the old-style Swing applications, [and] with the same technology we can create things [that look] similar to the Vista [UI].

[snip]

When you bring up Windows, most rich clients aren't that rich, actually. They're just gray and dull and have a lot of buttons and text fields. We needed to find a term to talk about clients that go beyond that--rich clients with animation and 3D. The kinds of stuff you see on Vista today. We used the term filthy-rich clients to talk about those clients that tried to go beyond the existing user interfaces...

Rich-clients are getting better and better. They steal ideas from the Web, so we are now at this integration of several media. You have 3D, you have video, it goes beyond just the images we've had so far.


Here is the thing: I don't want to monkey with all the stuff to make my swing app look good. If it is gray and dull that is because you aren't providing me with a default that looks better. This is one of the reasons people respond so well to Flex apps: they look great with just the defaults. I, like most programmers, am lazy. I usually just want an app that does X as quickly as possible. Give me a toolkit that makes it look good by default.

8 Comments

Jesse Kuhnert
2007-02-02 18:35:40
Amen ....Swing is a stinking P.O.S...Let's not even get into how little it does by default with other similar functions found in better native gui api's. (like rendering hints, event connection signal slot bindings , etc..)


Having spent years having to maintain some swing apps I've developed a solid hatred for the API and overall philosophy of whoever is responsible for that part of the JDK. ;)

Tim O'Brien
2007-02-03 18:19:54
True, very True, Flex is the next UI technology of choice.
Fred
2007-02-03 20:34:04
How about y'all young hipsters retire the word "pimp". It's not hip, it's not cute- it refers to loathesome people and practices. The English language is full of great words that don't glamorize a disgusting class of people- ballyhoo, boost, drum, flog, hawk, move, peddle, pitch, plug... Google can help you find them.
Jesse Kuhnert
2007-02-03 22:13:35
Hmmm... It seems Fred's pimp hand is not so strong these days.


Jan Erik
2007-02-04 17:11:44
You could try QT or XAML. Which are in competition with JFC/Swing.


It feels like "Swing sucks" or "Javascript+XML sucks" is used as an argument for "let's use Flex instead because people don't really know whether it sucks or not".


Other than that, I love new stuff and use Adobe and Macromedia products.
Adobe skills pay the bills.

cooper
2007-02-04 17:25:45
Well, I still don't give Flex much real play, personally. The Flex licensing is still stupid beyond words, and completely impractical for enterprise use. Apollo, however, is much more compelling, and mixing browser-based technologies into a RIA fat client is a serious step up. Laszlo and GWT interest me much more than Flex for web development.. esp since they don't change by the CPU... or at all. I have used Flex for a couple of pilot projects, and aside from using the GAWD AWFUL Adobe XML and WS APIs, it is not a bad kit.


XAML/Sparkle are actually pretty amazing. Seeing that kind of stuff is the kind of things that really highlights how stagnant Java has been for so long.

JT Wenting
2007-02-04 22:29:13
Personally I'm sick and tired of applications that their authors think look "cool" because they have all kinds of flashing colours and animated buttons and stuff.
If an application looks all flashy and colourful I am immediately declined do remove it as soon as I can find a viable alternative.


I LIKE the Metal LAF. It looks good, doesn't hurt my eyes just looking at it, and I'm not distracted by buttons that change their icons and shape to attract my attention and then make funky noises when I click them.

Adam
2007-02-06 12:51:26
I just want a decent looking app. With Java 6, Swing is using native widget rendering. This is good enough for the majority of applications out there. This is a decent default approach.


You're right, if you want to create really "cool" looking applications, creating a L&F for swing is not a trivial process. Neither is using Java2D or 3d, or any of that other fancy stuff that Romain does. Flex does stand a chance with that crowd.


However, for everyday applications (business or consumer oriented), Swing is a solid choice. And, it can grow with your look & feel changes/whims.