FileDocCategorySizeDatePackage
TestSwing.javaAPI DocExample2155Thu Feb 04 16:10:40 GMT 1999None

TestSwing

public class TestSwing extends JApplet implements ActionListener

Fields Summary
Constructors Summary
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent ae)

		class doClose implements Runnable {
			public void run() {
				//.. access Swing components here ..
			}
		};
		doClose dc = new doClose();
		if (SwingUtilities.isEventDispatchThread())
			dc.run();
		else {
			try {
				SwingUtilities.invokeAndWait(dc);
			} catch (Exception e) {}
		}
	
public voidinit()

		JButton jb = new JButton("Close");
		getContentPane().add(jb);
		jb.addActionListener(this);