If you are presented with the task of creating a Swing program that replaces an existing AWT program, it's important that you first learn some Swing basics (like you will learn in the next chapter). Then, convert the AWT program to its Swing-based equivalent, and then add new capabilities and/or remove/replace existing capabilities. When you are ready to convert from the AWT to Swing, keep the following tips in mind:
These tips are summarized ”and paraphrased ”from the conversion tips offered by the online Java Tutorial located at http://www.javasoft.com/tutorial. For more details, please visit this tutorial and check out its AWT to Swing conversion section. Troubleshooting Tip If you're converting an AWT program that uses list and text components to Swing, you might notice that when you run the Swing version of this program, its list and text components don't have scrollbars. See "List and Text Component Scrollbar Differences," in the "Troubleshooting" section for more information. |