A super-simple program, that displays a single message and quits.
extends JOptionPane
Allows Dialog commands to be executed.
showMessageDialog(this,"Warning
...");
Pop-up Dialog showing message.
System.exit(0);
Ends the program.
Real programs are never this short - this does nothing useful. Extending JOptionPane is not the normal way to start a program - rather extend JFrame would be normal.