Example usage for javax.swing JInternalFrame setName

List of usage examples for javax.swing JInternalFrame setName

Introduction

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

Prototype

public void setName(String name) 

Source Link

Document

Sets the name of the component to the specified string.

Usage

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

public void insertInternalFrame(ExtendedJPanelImpl name) {
    ExtendedJPanelImpl jPanelImpl;/*  w ww.ja v a2s.  c om*/
    try {
        jPanelImpl = name;
        panelMap.put(name.getName(), name);
        JInternalFrame jInternalFrame = new JInternalFrame();
        jInternalFrame.setSize(400, 300);
        jInternalFrame.setName(jPanelImpl.getName());
        jInternalFrame.setTitle(jPanelImpl.getTitle());
        jInternalFrame.getContentPane().add(new JScrollPane(jPanelImpl));
        jInternalFrame.setIconifiable(true);
        jInternalFrame.setMaximizable(true);
        jInternalFrame.setResizable(true);
        jInternalFrame.setClosable(true);
        jInternalFrame.addInternalFrameListener(windowController);
        frameMap.put(jInternalFrame.getName(), jInternalFrame);
        desktop.add(jInternalFrame);
        desktop.getDesktopManager().activateFrame(jInternalFrame);
        desktop.getDesktopManager().maximizeFrame(jInternalFrame);
        jInternalFrame.moveToFront();
        jInternalFrame.setSelected(true);
        jInternalFrame.setVisible(true);
        jInternalFrame.validate();
        activeFrameMenu.addFrameButton(jPanelImpl.getName());
        menuController.setActiveFrameName(jInternalFrame.getName());
    } catch (Exception e) {
        log.error("cannot open panel " + name, e);
    }

}