Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Swing

Status
Not open for further replies.

drewdaman

Programmer
Aug 5, 2003
302
CA
Hello,

I haven't used java in many years now.. i learned OO principles using java.. but haven't written any code in it in at least 2-3 years! been using c++...

i think my basics are ok.. but i need to learn swing... in fact, i need to learn the basics of swing fairly quickly! i was hoping someone could point me to a good tutorial. also, other than swing, are there other ways to make user interfaces in java? if so, could you name a few popular ones?

thanks!
drew.
 
Me too. I was heavily into Swing when I came across it, so I haven't ventured into it yet ... wanted to get proficient at Swing first. Might give it a go soon...

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
There was a nice discussion at eclipse formus some time ago between AWT and Swing. I left it when it had about 300 replies, noi idea of how's going now.

Basically I think SWT is faster and sometimes easier to use, but as it has the native dependences it can be seen as a way back to a native language.

I must admit that I don't know how lookandfeel works in SWT. But if it works ok, the overload of Swing components would be a good point for SWT.

Cheers,

Dian
 
but as it[SWT] has the native dependences it can be seen as a way back to a native language.

How do you think AWT works (and Swing for that matter through AWT) ? Its all just wrapped calls to the native windowing system !

--------------------------------------------------
Free Database Connection Pooling Software
 
I WON'T start this 200-replies discussion again. :p

Of course the whola Java thingie is a wrap to native calls and ends in assembler directives. But Swing is built on the top of the AWT, far away from the native side while SWT is fully dependant of the underlyinng OS.

I'm not betting for one or another, just pointing out some differences.

Cheers,

Dian
 
One thing I will say .. if you want to create a quick interface, AWT is a good bet. If you want to create a quick nice interface SWT is probably the way to go. If you want to create a really rich interface with lots of custom widgets, and you have lots of time Swing is the thing for you.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
So do you think Swing is eaiser to customize than SWT? Or that an SWT interface is quicker to do?

I think that Swing tools are more developed that SWT ones so for a beginner it would be easier to use Swing than SWT, at least at first sight.

That also applie to property editors, so you can customize your Swing components easier than the SWT ones. In the other hand, maybe the SWT are easier to extend and add behaviour.

Cheers,

Dian
 
I'll admit to having little knowledge of SWT. I suspect you're right about the tools, though.

I love Swing, but at times it can be overwhelming and long-winded.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
wow! thanks for all the responses guys!

it seems to me that you guys are saying that swing is the most powerful of the lot. i will look into that i guess!

i have jdk 1.5.0.1 installed. is this good enough to use with swing? also, timw, are you saying htat you can't use swing with eclipse? i have never used eclipse, but i did download it. are there any other free editors (good, not like notepad :p) that you might recommend to use with swing if i can't use eclipse?

thanks!
 
The nice part of Swing is that it's a Java implementation, easy and intuitive for Java programmers. It's slow, of course.


SWT is faster, but you have to deal with typical native processed like making the memory free after usage. That can be nice for C++ programmers as that's what they are used to do.

Just if you get bored.

A nice compoarative article

Why do I have to choose? :p

Of course, if you want to see zillions people arguying about this, go to the SWT forum at and have fun.

Cheers,

Dian
 
Ahhh. This old cookie.

JDK1.5 is the latest and will do Swing just fine.
To clarify the SWT/Eclipse thing ... Eclipse is (I believe) written using SWT and has the SWT libraries incorporated. You can do Swing and AWT work using Eclipse and there is a Visual Editor for Swing (have a look on the Eclipse site
The best IDE for Swing work I have used is JBuilder. You can download the Foundation version for free (google for JBuilder Foundation).

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Visual editors tend to include own code, so you should at least study their license agreements.

Afaik, swt is only available for the x86-Platform and mac, while swing will run where java is running.

I heared, that swt is much slower in a few circumstances, compared to swing (big trees, ...).

seeking a job as java-programmer in Berlin:
 
Useful points, stefanwagner. When I started using JBuilder to develop UIs, I had to be careful what I used since certain things were proprietary Borland additions. You have to know what is provided out-of-the-box by Sun to avoid vendor-lockin.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top