Example usage for javax.swing JRootPane setGlassPane

List of usage examples for javax.swing JRootPane setGlassPane

Introduction

In this page you can find the example usage for javax.swing JRootPane setGlassPane.

Prototype

public void setGlassPane(Component glass) 

Source Link

Document

Sets a specified Component to be the glass pane for this root pane.

Usage

From source file:com.haulmont.cuba.desktop.TopLevelFrame.java

protected void initUI() {
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    glassPane = new DisabledGlassPane();
    JRootPane rootPane = SwingUtilities.getRootPane(this);
    rootPane.setGlassPane(glassPane);

    Configuration configuration = AppBeans.get(Configuration.NAME);
    DesktopConfig config = configuration.getConfig(DesktopConfig.class);

    DesktopResources resources = App.getInstance().getResources();
    if (StringUtils.isNotEmpty(config.getWindowIcon())) {
        setIconImage(resources.getImage(config.getWindowIcon()));
    }//from  ww w .  ja  v a2  s  .  c o  m
}