Recall that many Swing classes start with
Similar AWT classes do not start with
A frequent error is to forget the
J and get the wrong class.
Then your program will almost work,
but not quite,
and finding the problem can be hard.
For example, the AWT class
Button will not work in place of
Here, as a review, is how the class
fits into the Swing hierarchy:
JButton a kind of container?