is Swing in Java 1.5 a lot faster?

dpopiz

Diamond Member
Jan 28, 2001
4,454
0
0
lately I've been doing some C# stuff, but I remember reading about java 1.5 a while ago and thinking I would surely switch to it once it came out. the reason being: the only reason I don't do java is because Swing is so unresponsive and because it doesn't look the same as the host OS's GUI.
but Java 1.5 was supposed to fix both of those things. so now that it's out, I'm curious how true those statements are. I mean C# is great, but Java has been around so much longer and has so much better support, so I'd rather develop on it.

so have you tried writing stuff in Java 1.5? do GUI apps seem snappy and do they look like everything else in windows or whatever OS it's running on?
 

dpopiz

Diamond Member
Jan 28, 2001
4,454
0
0
so does it feel snappy/responsive though? in otherwords, do most things in response to mouse clicks happen instantly if there isn't too much number crunching to code to be done? as opposed to earlier java programs where everything on the GUI has a little bit of lag
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: dpopiz
so does it feel snappy/responsive though? in otherwords, do most things in response to mouse clicks happen instantly if there isn't too much number crunching to code to be done? as opposed to earlier java programs where everything on the GUI has a little bit of lag


Yes, just make sure you put the GUI in a seperate thread.
 

manly

Lifer
Jan 25, 2000
12,216
3,126
136
I believe Swing was much improved in Java2 1.4, but I don't know if there are any further refinements in Tiger.

I believe you'd choose SWT if you want native look & feel and responsiveness. But BEA WebLogic Workshop proves Swing is extremely performant when used properly.
 

znaps

Senior member
Jan 15, 2004
414
0
0
Here are the Swing updates in 1.5: http://java.sun.com/j2se/1.5.0/docs/guide/swing/1.5/

One of them is a fix to improve memory consumption of Swing apps, so you might see less memory being used, which might help if your app is memory intensive.


As manly said, Swing performance was upped greatly in previous 1.4 release - 1.4.2 is good enough for me.