|
A new version of the Java Tutorial trail Creating a GUI with JFC/Swing, also known as The Swing Tutorial, was recently released. The authors are updating this trail from version 1.1/1.2 to version 1.4 of the Java 2 Platform, Standard Edition (J2SE). This article highlights some of the changes you'll find now and in the near future. The tutorial authors will be pushing out updates in stages. Some pages of The Swing Tutorial are preliminary and you may see comments noting where the authors intend to make changes. As they are doing this, they would like your comments and suggestions. At the end of this article, there is a link to the form that you can use to give them your feedback. New Pages of The Swing TutorialPages added in the most recent version of the tutorial include:
The 1.4 examples index pages list the many examples that have been updated to the 1.4 API, and include links to JNLP files that let you run the examples using Java Web Start. The examples indexes also have links to where each example is discussed and to the files required for each example, including the full source code. Often updating the code to 1.4 required few or no changes. Still, the authors took advantage of the opportunity to improve comments, make the examples more robust, and use new 1.4 features such as look-and-feel-provided decorations on windows.
The biggest changes, so far, were to the ![]()
Click here to run the demo using Java Web Start. If you have trouble running the demo, please visit the tutorial's new Java Web Start page for troubleshooting tips. You can find the source code for The recently added How to Use Key Bindings section provides detailed information on the appropriate use of key bindings. As the tutorial explains, key bindings are often used behind the scenes by mnemonics (supported by all buttons) and accelerators (supported by menu items). When you need to make your program react to user key presses that aren't otherwise handled by the Swing API, you can use either key bindings or key listeners. For responding to individual keys, key bindings are usually more appropriate and tend to result in more easily maintained code. Updated Pages of The Swing TutorialWhile most of the tutorial's existing pages have not been completely updated to 1.4, some have. These updates include:
The changes to How to Use Actions are probably the most interesting, so far. This page now covers more
The existing action example, ![]()
Click here to run the demo using Java Web Start. If you have trouble running the demo, please visit the tutorial's new Java Web Start page for troubleshooting tips. You can find the source code for How You Can ContributeThe writers plan to have the new edition of the book The JFC Swing Tutorial available by next June, in time for JavaOne. You can help this book and the The Swing Tutorial Web site be their best by offering your suggestions for using the tutorial feedback page. Also, if you're interested in learning more about Swing programming, please register for the tutorial announcement list so you can be notified when the authors update The Swing Tutorial. Take the QuizFeel like you know The Swing Tutorial pretty well? Take the quiz to make sure.
| |||||||||
|
| ||||||||||||