SWT Patterns
  SWT Patterns 
  Pattern Programming 
  SWT Widgets 
  Form Layout 
  Event Handling 
  Example Program 
  Downloads 
  Java Resources 



SWT Patterns

SWT Design Patterns (for the Eclipse package) has been developed based on past experience in developing very complex GUI software systems in AWT and Swing. Originally, we have developed GUI Patterns to overcome the differences in how things are done in different versions of Java GUI packages. Especially, event handling between Java 1.0 AWT and Java 1.1 AWT and Swing is very different, making Java GUI application programs incompatible! This problem was caused by the changes in how things are done in different versions. Our solution was to develop adaptor patterns that provide source code level compatibility for Java GUI application programs, with the emphasis on "what should be done", not "how should be done" that created the problem. Note that without this, we should have written large applications virtually three times! We use two patterns: AWT Design Patterns and Swing Design Patterns with nearly identical APIs. (Note that we have to virtually abandon the Swing version due to the well-known quality issues of Swing widgets.)

The approach has proven to be extremely powerful in terms of software development and management, in addition to maintaining source code compatibility. We investigated the idea of extending this to SWT. Our aim was to make AWT/Swing programs to run as SWT programs with SWT Patterns after recompilation, which will make migration to SWT trivial! However, there are a few critical constraints in SWT that limit full compatibility between SWT and others. For example, SWT widgets have mandatory parentage! You have to create them in hierarchical order which is not required in AWT/Swing. This alone made our initial aim impossible to implement. Instead, we ended up with the current package which will make easier for both developers with AWT/Swing experience and SWT-only developers to write. It can reduce effort required in rewriting s/w. SWT Patterns offers the following advantages;

  • GUI Programming = Widgets + Event handling.
  • Focus on "what is done" than "how is done".
  • Source code compatibility for changes in future SWT versions.
  • Potential for easy migration to another similar GUI package.
  • Simple to write standard enterprise software quickly.
  • Easy to read and maintain your source code.
  • Less coding errors.
  • Shorter programs.
  • Open source.
  • Absolutely free!

Special Features of SWT Patterns

SWT Design patterns provide the following special features;

  • Simple standardized event handling.
  • Automated sash operations.
  • Specification based form layout handling.
  • Simple menu and toolbar support.
  • No hassles with thread ownership!

The SWTPatterns Package

To learn more about SWT Patterns;

  • Introduction to SWT Pattern Programming.
  • Event Handling.
  • Form layout.
  • Sash no more.
  • Example program.
  • SWTPatterns widgets.
    ... for detail information, click here.