Java Program with Button
Works as an applet or as an app.
Includes a private class to handle mouse events, implementing the MouseListener interface.
Puts up a single button labelled “Press Me!”
When the button is clicked a new frame (window) is created with a message in it.
Note: the new frame doesn’t go away!