Example usage for java.awt Component isDisplayable

List of usage examples for java.awt Component isDisplayable

Introduction

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

Prototype

public boolean isDisplayable() 

Source Link

Document

Determines whether this component is displayable.

Usage

From source file:Main.java

public static boolean isFocusable(Component c) {
    return c.isFocusable() && c.isDisplayable() && c.isVisible() && c.isEnabled();
}

From source file:pl.edu.icm.visnow.lib.utils.ImageUtilities.java

public static void centerComponentToContainer(Component component, Component container) {
    if (container.isDisplayable() == false) {
        container.addNotify();//from   www  .  j a  v a 2s  . c om
    }
    component.setLocation((container.getWidth() - component.getWidth()) / 2,
            (container.getHeight() - component.getHeight()) / 2);
}