Java – SWT and AWT, what is the difference

awtjavaswt

I understand that this question is rather general and kind of a holy war. Could you explain to me why SWT is successful when AWT is not, while these two frameworks use the same idea of native ui controls. What makes SWT different comparing to AWT? Just few words if possible.

Thank you.

Best Answer

AWT is the original cross-platform, native-peer based GUI widget set. It drew a lot of complaints for not being perfectly consistent across platforms. Sun built the Swing widget set to answer those concerns, building it with pure Java (no native peers), but people complained that it was slow and ugly.

IBM built SWT as a native-peer based competitor to Swing. It succeeded because it looks good, performs well and is pretty consistent across platforms. It cemented it's position by getting used by many popular applications, Eclipse and Vuze being the most obvious.