Java Code Examples for javax.swing.JComponent.isShowing()

The following are Jave code examples for showing how to use isShowing() of the javax.swing.JComponent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: incubator-netbeans   File: ToolbarVisibleTest.java   Source Code and License Vote up 5 votes
private void assertVisible(String msg, JComponent tc) throws InterruptedException {
    int cnt = 0;
    while (!tc.isShowing()) {
        Thread.sleep(100);
        if (cnt++ > 10) {
            break;
        }
    }
    assertTrue(msg + ". Showing", tc.isShowing());
}