O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing Lightweight Components

Developing custom components versions of the AWT prior to 1.1 typically involved extending either java.awt.Canvas or java.awt.Panel—the latter was extended when a custom component had to function as a container.

Lightweight custom components are implemented simply by extending either java.awt.Component or java.awt.Container. With previous versions of the AWT, Component and Container could only be extended only by classes residing in the java.awt package, because their constructors had package scope. This restriction has been removed as of the 1.1 AWT—classes outside of the java.awt package may now extend either Component or Container.

The AWT: A Heavyweight World

In principle, creating a lightweight component ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required