Friday, August 3, 2012

Introducing Java SWT

I have been using Java Swing for a while, I have some personal view of points about Swing.

It is very hard for a beginner to build a good looking GUI with Swing. Without further knowledge of Swing, the GUI doesn't look like a proper software.The  appearance doesn't fit the current system.

Swing is not thread-safe. Thread is the core of front-end design of this project. I need to care about which thread is updating GUI. If something goes wrong, some unpredictable behaviors will happen.

I have introduced Java SWT into my GUI design base on following reasons.

Java SWT always fits the current operation system. The GUI is friendly to users.

Java SWT will throw exceptions when threads go wrong which is better than the uncertainty of Java Swing.

Java SWT runs faster than Java Swing, since my job is performance test, I want to reduce the influence of GUI to the performance of the test.

However Java SWT is not perfect. I need to worry about the compatibility of Java SWT on the Non-Windows platforms. The Java SWT is not included in the standard JRE package, it needs to be installed.

No comments:

Post a Comment