Skip to main content
gamedev.net
🔒 Locked

Java swing

Started by Grizwald 14 replies 950+ views
Original Post
Grizwald
Grizwald
What do you think about it? Love it? Hate it? I think it is what MFC is trying to be Although i have no experiance with .NET forms... How does swing stack up to .NET? This isn''t about JAVA, so if you hate java, don''t bitch (i don''t care for it much myself, but swing is really nice)
I love me and you love you.
nonnus29
nonnus29
Swing will use OpenGL for rendering on Linux and Mac in Java 1.5. Swing on windows was very slow in 1.3, but in 1.4.2, the most recent version it uses hardware accelerated rendering whenever possible. It is quiet fast.

The Alchemist
The Alchemist
its still slower than awt though

truth be told... im yet to see a reason to use swing instead of AWT
"Everything works out in the end, if it doesn't then it is not the end"
Taulin
Taulin
quote:
Original post by The Alchemist
its still slower than awt though

truth be told... im yet to see a reason to use swing instead of AWT


ewww...lies. Because I am not an expert on Swing, I can not attack you, however, my research in Swing (which was over two years ago) proves other wise.

I made, in under two days, a fully functional model skinner in Swing, while learning it.

Anyone whoever says Swing is slow, does not know how to use it correctly. This either means they are bad programmers, or Swing was programmed bad.
cmptrgear
cmptrgear
Swing is awesome. If the .Net framework inst going to use something like it for making windows then Microsoft is run by morons. If only windows had something similar for C/C++ I would be in heaven.

"Give a man a fish and he will eat for a day, drown a man in the water and the fish will eat for a week!
"Pfft, Facts! Facts can be used to prove anything!" -- Homer J. Simpson
The Alchemist
The Alchemist
quote:
Original post by Taulin

ewww...lies. Because I am not an expert on Swing, I can not attack you, however, my research in Swing (which was over two years ago) proves other wise.

I made, in under two days, a fully functional model skinner in Swing, while learning it.

Anyone whoever says Swing is slow, does not know how to use it correctly. This either means they are bad programmers, or Swing was programmed bad.


attack me? omg... but im so cute =^.^=

swing will be always slower than AWT, the deal is... AWT uses the resources of the native gui being used... is not different than a non java program, while swing is just a blank window with all drawing done by the JVM so all the stuff that would be handled by the native gui (like cicling between buttons with tabs,events,etc) being also done by the JVM... but the swing must still receive the events from the native gui , see the overhead?

one day swing will be fast enough so we cant see the difference... but now it still takes longer to refresh, hangs, etc much more than awt




"Everything works out in the end, if it doesn't then it is not the end"
Conner McCloud
Conner McCloud
quote:
Original post by The Alchemist
attack me? omg... but im so cute =^.^=

swing will be always slower than AWT, the deal is... AWT uses the resources of the native gui being used... is not different than a non java program, while swing is just a blank window with all drawing done by the JVM so all the stuff that would be handled by the native gui (like cicling between buttons with tabs,events,etc) being also done by the JVM... but the swing must still receive the events from the native gui , see the overhead?

one day swing will be fast enough so we cant see the difference... but now it still takes longer to refresh, hangs, etc much more than awt

There's more to such decisions than just speed. If there weren't, you wouldn't be using Java in the first place. Swing is both better designed and more powerful than the awt, so a [temporary] loss of clock cycles is more than worth it.

*edit: plus, I like drag and drop GUI programming.

CM

[edited by - Conner McCloud on January 31, 2004 1:11:39 AM]
Grizwald
Grizwald
is there a form designer for swing?
I love me and you love you.
Conner McCloud
Conner McCloud
quote:
Original post by Grizwald
is there a form designer for swing?

Netbeans has one. Its a little primative [or it seems to be, i just may not know what I''m doing], but it gets the job done.

CM
The Alchemist
The Alchemist
you can do form edit on Jbuilder and in the IDE previusly know as forte (sunONE) too

i dont know about borland's but you can do form edit with AWT too in sunONE

Conner: indeed... but Swing is realy slugish... specialy on big apps and in <1Ghz machines, swing indeed is more powerfull than AWT but is not like AWT was't funcional to start with... and as far i know the way that AWT and swing works are exactily the same when you program using it, and IIRC the internals are the same too just that swing need a extra topping

[edited by - the alchemist on January 31, 2004 2:34:05 AM]
"Everything works out in the end, if it doesn't then it is not the end"
Drevay
Drevay
You know, all this talk of Java made me go and download the SDK.

Now I have no idea where to go from here...

I feel lost and alone, and cold, and scared...

Someone help me (with Java that is)!


_________________Politics is the ability to foretell what is going to happen tomorrow, next week, next month and next year. And to have the ability afterwards to explain why it didn't happen. -- Winston ChurchillGDNet-0.2 - rate users the easy way with this nifty Firefox extension. Updated with new features.
DukeAtreides076
DukeAtreides076
quote:
Original post by Drevay
You know, all this talk of Java made me go and download the SDK.

Now I have no idea where to go from here...

I feel lost and alone, and cold, and scared...

Someone help me (with Java that is)!





(the tutorials on sun''s website are your friends)
GKW
GKW
Come to the dark side...

"... we should have such an empire for liberty as she has never surveyed since the creation ..."
Thomas Jefferson
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
HenryApe
HenryApe
quote:
swing will be always slower than AWT, the deal is... AWT uses the resources of the native gui being used... is not different than a non java program, while swing is just a blank window with all drawing done by the JVM so all the stuff that would be handled by the native gui

Not necessarily. Apple''s implementation of Swing for MacOSX also uses native controls. Looks and performs like any native app.
The Alchemist
The Alchemist
quote:
Original post by HenryApe
Not necessarily. Apple's implementation of Swing for MacOSX also uses native controls. Looks and performs like any native app.


is a weird implementation then... since the whole deal about swing is looking the same no matter the plataform, are you sure that the macOS jvm or the program inst somehow defaulting to the macOX skin of swing?


[edited by - the alchemist on January 31, 2004 2:48:19 PM]
"Everything works out in the end, if it doesn't then it is not the end"
Conner McCloud
Conner McCloud
quote:
Original post by The Alchemist
quote:
Original post by HenryApe
Not necessarily. Apple''s implementation of Swing for MacOSX also uses native controls. Looks and performs like any native app.


is a weird implementation then... since the whole deal about swing is looking the same no matter the plataform, are you sure that the macOS jvm inst somehow defaulting to the macOX skin of swing?


You can set the look and feel to the default for whatever system you are running. So in OSX it''ll have the green bubbles, but on Windows it''ll have grey squares. Swing defaults to an ugly theme that looks the same everywhere, but the programmer can change it.

CM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.