Example usage for java.awt Component setIgnoreRepaint

List of usage examples for java.awt Component setIgnoreRepaint

Introduction

In this page you can find the example usage for java.awt Component setIgnoreRepaint.

Prototype

public void setIgnoreRepaint(boolean ignoreRepaint) 

Source Link

Document

Sets whether or not paint messages received from the operating system should be ignored.

Usage

From source file:Main.java

private static void doSetIgnoreRepaintInEDT(final Component component, final boolean ignoreRepaint) {
    component.setIgnoreRepaint(ignoreRepaint);

    if (component instanceof Container) {
        Container container = Container.class.cast(component);

        Component[] components = null;

        synchronized (container.getTreeLock()) {
            components = container.getComponents();
        }//w ww.j  a  va 2  s  .c o  m

        for (int i = 0; i < components.length; i++) {
            doSetIgnoreRepaintInEDT(components[i], ignoreRepaint);
        }
    }
}