Example usage for javax.swing JInternalFrame moveToBack

List of usage examples for javax.swing JInternalFrame moveToBack

Introduction

In this page you can find the example usage for javax.swing JInternalFrame moveToBack.

Prototype

public void moveToBack() 

Source Link

Document

Convenience method that moves this component to position -1 if its parent is a JLayeredPane.

Usage

From source file:org.en.tealEye.guiMain.MainAppFrame.java

public void activateInternalFrame(String panelName) {
    JInternalFrame[] frames = desktop.getAllFrames();
    for (JInternalFrame frame : frames) {
        if (frame.getName().equals(panelName)) {
            frame.moveToFront();/*from   w w  w .  j ava 2 s .  co m*/
            //desktop.getDesktopManager().deactivateFrame(frame);
            desktop.getDesktopManager().activateFrame(frame);
            try {
                frame.setSelected(true);
                menuController.setActiveFrameName(frame.getName());
            } catch (PropertyVetoException e) {
                log.error(e.getMessage(), e);
            }
        } else {
            frame.moveToBack();
        }
    }
}