• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: III Applications

Part III: Applications

If you have read the book to this point, you should have a good understanding of how SWT works. The many examples and code fragments have given you a toolkit of useful patterns for writing SWT programs. What has been missed, however, was the end-to-end story showing how the pieces all fit together in real-world applications.

In this part of the book, we will provide two examples that show how SWT can be used to build interesting, first-class, native platform applications using portable Java code—the ideal of SWT.

The first application is Minesweeper. This is a simple game that most people have seen before. Our version uses a custom widget to display the board, simple image handling to display the action, and timers to track progress. It runs well on all the supported platforms and shows that you can build something good without adding a lot of baggage.

The second application is a powerful file explorer called (naturally enough) FileExplorer. This example is significantly larger but includes everything that would be required in a commercial application, including a modern GUI, drag-and-drop support, and internationalization. It also supports the launching of other applications by double-clicking. Finally, it is a multi-threaded application that demonstrates how you can use threads to keep the user interface responsive while long operations are executing.

Our goal here is not to “pad the book” with the code for these applications, however. As we said in the Introduction, we believe that “a program is worth a thousand words.” To really understand what these applications do, you are going to have to read the code for them. The two chapters in this part of the book are intended to be the “study guides” to direct you through that code. They describe what the applications are intended to do and the basic program structure, and they identify the “points of interest”—those patterns that will almost certainly show up in the applications that you build.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint