• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SWT vs Swing

 
Padma Prasad
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use SWT, you'll also have to manage disposal of the components you create.
 
Padma Prasad
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic