JButton button = new JButton("Press Me");
button.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent e ) {
text.append("Button Pressed!\n");
}
} );
getContentPane().add( "Center", new JScrollPane( text ) );
JPanel panel = new JPanel();
panel.add( button );
getContentPane().add( "South", panel );
text.append( "Java Version: "+System.getProperty("java.version")+"\n" );
text.append( "Applet init()\n" );