FileDocCategorySizeDatePackage
SwingTestCase.javaAPI DocExample1114Sat Aug 24 09:29:20 BST 2002com.oreilly.javaxp.junit

SwingTestCase

public class SwingTestCase extends TestCase

Fields Summary
private JFrame
testFrame
Constructors Summary
public SwingTestCase(String name)

        super(name);
    
Methods Summary
public javax.swing.JFramegetTestFrame()

        if (this.testFrame == null) {
            this.testFrame = new JFrame("Test");
        }
        return this.testFrame;
    
protected voidsetUp()

    
protected voidtearDown()

        if (this.testFrame != null) {
            this.testFrame.dispose();
            this.testFrame = null;
        }
    
public voidwaitForSwing()

        if (!SwingUtilities.isEventDispatchThread()) {
            try {
                SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                    }
                });
            } catch (InterruptedException e) {
            } catch (InvocationTargetException e) {
            }
        }