Example usage for java.awt Frame isVisible

List of usage examples for java.awt Frame isVisible

Introduction

In this page you can find the example usage for java.awt Frame isVisible.

Prototype

@Transient
public boolean isVisible() 

Source Link

Document

Determines whether this component should be visible when its parent is visible.

Usage

From source file:dr.app.bss.Utils.java

public static Frame getActiveFrame() {
    Frame result = null;//from w  ww  .  jav a2s  .  c o  m
    Frame[] frames = Frame.getFrames();
    for (int i = 0; i < frames.length; i++) {
        Frame frame = frames[i];
        if (frame.isVisible()) {
            result = frame;
            break;
        }
    }
    return result;
}

From source file:org.paxle.desktop.impl.DialogueServices.java

private static void show(final Frame frame) {
    final int extstate = frame.getExtendedState();
    if ((extstate & Frame.ICONIFIED) == Frame.ICONIFIED)
        frame.setExtendedState(extstate ^ Frame.ICONIFIED);
    if (!frame.isVisible())
        frame.setVisible(true);//from ww w.j  ava 2s .  co  m
    frame.toFront();
}