JButton
Recall that many Swing classes start with J.
Similar AWT classes do not start with J.
A frequent error is to forget the J and get the wrong class.
For example, there is an AWT class Button.
Here, as a review, is how the class JButton
fits into the Swing hierarchy: