Example usage for javax.swing JDialog setGlassPane

List of usage examples for javax.swing JDialog setGlassPane

Introduction

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

Prototype

@BeanProperty(bound = false, hidden = true, description = "A transparent pane used for menu rendering.")
public void setGlassPane(Component glassPane) 

Source Link

Document

Sets the glassPane property.

Usage

From source file:org.martus.client.swingui.FxInSwingMainWindow.java

protected void hideActiveWindowContent() {
    JFrame frame = getCurrentActiveFrame().getSwingFrame();
    if (frame != null) {
        frame.setGlassPane(new WindowObscurer());
        frame.getGlassPane().setVisible(true);
    }/*  w w w.j av  a2  s .  c  om*/

    JDialog dialog = getCurrentActiveDialog();
    if (dialog != null) {
        dialog.setGlassPane(new WindowObscurer());
        dialog.getGlassPane().setVisible(true);
    }
}