FileDocCategorySizeDatePackage
ShowApplet.javaAPI DocExample783Sat Apr 23 22:35:42 BST 2005None

ShowApplet

public class ShowApplet extends JApplet

Fields Summary
JTextArea
text
int
startCount
Constructors Summary
Methods Summary
public voidinit()


	   
	
		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" );
	
public voidstart()

		text.append( "Applet started: "+ startCount++ +"\n" );
	
public voidstop()

		text.append( "Applet stopped.\n" );