Java JFrame replaceGlassPane(JFrame frame, Component newGlassPane)

Here you can find the source of replaceGlassPane(JFrame frame, Component newGlassPane)

Description

replace Glass Pane

License

Open Source License

Declaration

public static void replaceGlassPane(JFrame frame, Component newGlassPane) 

Method Source Code

//package com.java2s;

import java.awt.Component;

import javax.swing.JFrame;

public class Main {

    public static void replaceGlassPane(JFrame frame, Component newGlassPane) {
        Component oldGlassPane = frame.getGlassPane();
        if (oldGlassPane != null)
            oldGlassPane.setVisible(false);

        if (newGlassPane != null) {
            frame.setGlassPane(newGlassPane);
            newGlassPane.setVisible(true);
        }//from w w  w  . ja va 2 s.c om
    }
}

Related

  1. putOnWidestScreen(JFrame frame)
  2. refreshShape(final JFrame frame)
  3. registerCloseAction(final JFrame dialog, KeyStroke keyStroke)
  4. registerMenuShortcut(String uniqueActionName, Action action, int keyCode, JFrame frame)
  5. renderDialog(JFrame theframe, String szMessage, int noffsetx, int noffsety)
  6. restoreFrame(Class pClass, final JFrame pFrame, String pFrameId)
  7. restoreFrame(JFrame frame)
  8. rightShiftDialog(JDialog dialog, JFrame parent)
  9. run(JFrame frame, int width, int height)