Converting

AWT Swing

 

Step 1: Remove any java.awt import statements.

Step 2: If your program is an applet, remove any java.applet import statements.

Step 3: Import the main Swing package.

Step 4: Be aware of thread-safety issues!

Step 5: Change each AWT component to its closest Swing equivalent.

Step 6: Investigate Swing's other components and their use for the existing application.

Step 7: Change calls to the add and setLayout methods.

Step 8: Use the compiler to find out any more needed changes.

Step 9: Run and compare the old and new versions.