aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes SWT vs Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "SWT vs Swing" Watch "SWT vs Swing" New topic
Author

SWT vs Swing

Padma Prasad
Ranch Hand

Joined: Sep 16, 2002
Posts: 76
Hi,
I need to develop some GUI now. I used AWT some time back. later came this swing. now people talk about SWT. I dont understand which one should I prefer for my current development. I donno the pros and cons of either. can you guys out there help me in choosing?
Regards,
Padma.
Idly Vada
Ranch Hand

Joined: Sep 02, 2003
Posts: 135
Originally posted by N Padma:
Hi,
I need to develop some GUI now. I used AWT some time back. later came this swing. now people talk about SWT. I dont understand which one should I prefer for my current development. I donno the pros and cons of either. can you guys out there help me in choosing?
Regards,
Padma.


Swing�The reference GUI toolkit for J2SE.
SWT�This library has been developed by IBM as a part of the Eclipse platform.
SWT provides native widget functionality. It's analogous to AWT/Swing, but uses native OS widgets. AWT/Swing cannot do that because then programs wouldn't be portable in the strict Sun sense. If you use SWT you'll have to provide some OS-dependent files with your program, basically a thin JNI-interface. But you'll get a Java program that looks and feels like other programs on the OS they run on.

for more info:
http://www.developer.com/java/other/print.php/2179061
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
If you use SWT, you'll also have to manage disposal of the components you create.


kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Padma Prasad
Ranch Hand

Joined: Sep 16, 2002
Posts: 76
a little confusion. I use windows 2000 OS for development but will be deploying on Unix. so, I can't go for SWT now? if its OS specific?
Padma.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

You could still use SWT... it requires a system dependent library and JAR file, but the interface you program to stays the same. You would have the Windows 2000 set on your development machine, and the UNIX set for deployment. The code you develop on top of these will work with either.

Though I would recommend really testing stuff out on the UNIX machine early, because there could be some differences.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SWT vs Swing