Example usage for javax.swing JDialog getGlassPane

List of usage examples for javax.swing JDialog getGlassPane

Introduction

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

Prototype

public Component getGlassPane() 

Source Link

Document

Returns the glassPane object for this dialog.

Usage

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

protected void showActiveWindowContent() {
    JFrame frame = getCurrentActiveFrame().getSwingFrame();
    if (frame != null) {
        frame.getGlassPane().setVisible(false);
    }/*from   w w  w.j a v a2 s  .  co  m*/

    JDialog dialog = getCurrentActiveDialog();
    if (dialog != null) {
        dialog.getGlassPane().setVisible(false);
    }
}

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);
    }/*from ww  w .j  a  v  a  2s  .  c om*/

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