Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 
Training Index

Converting an Applet to an Application


by jGuru

Help  API Docs  About This Short Course  Short Course  Exercises

Convert the ColoredPanes applet to appear within an application, that is, within a Frame instance, rather than an applet.

Skeleton Code

Tasks


  1. Create class ColoredPanesAppl with nothing but a main() method that creates an instance of class ColoredPanesWindow, which you will create in the next task. Show that window.

  2. Create class ColoredPanesWindow. Turn the applet init() into the constructor. Set the size to 100 x 100.

  3. Add window-closing event handling to ColoredPanesWindow so you can close the window.

Where help exists, the task numbers above are linked to the step-by-step help page.

Solution Source

Demonstration

The program you are to write is an application and cannot be run from the browser. Run the solution from the command line as an application.

Next Exercise

Exercises

Short Course

Copyright 1996-2000 jGuru.com. All Rights Reserved.


Print Button
[ This page was updated: 21-Sep-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary | Feedback | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.