Java Code Examples
This class implements a label control by subclassing Canvas. On some
virtual machines, changing the color of labels doesn't work. Using
this class instead of Label does work.
This is a panel that draws a tiled image in its background.
Event Handling Examples
This class contains static convenience methods simulate key strokes to
an arbitrary component. It requires Java 1.1 or later.
Tab Capturing Canvas
This is an example of a custom Component that can be tabbed into, but
not out of. It works by consuming key events for tab.
This is an example of a Frame that exits the application when it is
asked to close itself. Applications that want that behavior for their
main frame can define a subclass of this class.
A simple layout that stacks components vertically, making each one as
wide as the widest component in the Container.
This layout arranges Components in a tree-like organization and draws
lines between them.
A class that implements a Queue data structure.
Requires java 1.1 or later.
A Simple SecurityManager
Here is a simple example of how to write and use a
SecurityManager to enforce a security policy.
Mark Grand's home page.