previous | start

Simple Graphics

Using two classes, you can create a graphical window and draw shapes and/or text in it.

The two classes are:

The JFrame class creates a window that 'frames' other items.

You can't draw or place text directly on a JFrame instance.

A JComponent is an item that can be added to a JFrame; i.e., inside the 'frame'.

A simple graphical program

But, there are some additional things going on.



previous | start