Example usage for javax.swing JInternalFrame validate

List of usage examples for javax.swing JInternalFrame validate

Introduction

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

Prototype

public void validate() 

Source Link

Document

Validates this container and all of its subcomponents.

Usage

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

public void insertInternalFrame(ExtendedJPanelImpl name) {
    ExtendedJPanelImpl jPanelImpl;//w  w  w  .  j  a v a 2  s.co m
    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);
    }

}