The super class constructor sets the title:
super( title )
To run the program, copy, save and compile the program in the usual way. Name the source file ButtonDemo.java.
C:\> javac ButtonDemo.java C:\> java ButtonDemo C:\>
The picture shows what the program displays. You can move the mouse pointer over the button and click on it, and the button will appear to move in and out. But the program does nothing in response to that event.