• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

SWT vs Swing  RSS feed

 
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.
 
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
 
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.
 
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.
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!