super(title);
setLayout( new BorderLayout() );
// Panel at the bottom with a flow layout to put an OK button
Panel bottom = new Panel();
bottom.setLayout( new FlowLayout() );
Button ok = new Button("Grrr!!!");
ok.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent ae) {
dispose();
}
} );
bottom.add(ok);
// Add a message label.
add("Center", new Label(message, Label.CENTER));
// Add the panel with the button to the south
add("South", bottom);
// Frame requires explicit setVisible(true)
setVisible(true);