Example usage for javax.swing JLayeredPane POPUP_LAYER

List of usage examples for javax.swing JLayeredPane POPUP_LAYER

Introduction

In this page you can find the example usage for javax.swing JLayeredPane POPUP_LAYER.

Prototype

Integer POPUP_LAYER

To view the source code for javax.swing JLayeredPane POPUP_LAYER.

Click Source Link

Document

Convenience object defining the Popup layer.

Usage

From source file:Main.java

public static void main(String args[]) {
    JFrame f = new JFrame("Sample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);//  ww  w .  j  ava2 s  .  c  o  m
    desktop.add(new SelfInternalFrame("1"), JLayeredPane.POPUP_LAYER);
    f.add(desktop, BorderLayout.CENTER);
    f.setSize(300, 200);
    f.setVisible(true);
}

From source file:MainClass.java

public static void main(String args[]) {
    JFrame f = new JFrame("Sample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);/* w  w w  .j  a v  a2s .  c om*/
    desktop.add(new SelfInternalFrame("1"), JLayeredPane.POPUP_LAYER);
    desktop.add(new SelfInternalFrame("2"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(new SelfInternalFrame("3"), JLayeredPane.PALETTE_LAYER);

    f.add(desktop, BorderLayout.CENTER);
    f.setSize(300, 200);
    f.setVisible(true);
}

From source file:InternalTest.java

public static void main(String args[]) {
    JFrame frame = new JFrame();
    Container contentPane = frame.getContentPane();
    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);/*  ww  w  . ja  v  a  2  s  .c  om*/
    desktop.add(createLayer("One"), JLayeredPane.POPUP_LAYER);
    desktop.add(createLayer("Two"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(createLayer("Three"), JLayeredPane.PALETTE_LAYER);
    contentPane.add(desktop, BorderLayout.CENTER);
    frame.setSize(300, 300);
    frame.show();
}

From source file:InternalFrameTest.java

public static void main(String args[]) {
    JFrame frame = new JFrame("Internal Frame Listener");
    Container contentPane = frame.getContentPane();
    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);/*ww w. j a v a2s  . c  o m*/
    desktop.add(createLayer("One"), JLayeredPane.POPUP_LAYER);
    desktop.add(createLayer("Two"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(createLayer("Three"), JLayeredPane.PALETTE_LAYER);
    contentPane.add(desktop, BorderLayout.CENTER);
    frame.setSize(300, 300);
    frame.show();
}

From source file:InternalFrameEventTest.java

public static void main(String[] a) {

    JFrame frame = new JFrame();
    Container contentPane = frame.getContentPane();

    JLayeredPane desktop = new JDesktopPane();
    desktop.setOpaque(false);/*w w w. ja v  a  2  s.  c  o  m*/
    contentPane.add(desktop, BorderLayout.CENTER);
    desktop.add(createLayer("One"), JLayeredPane.POPUP_LAYER);
    desktop.add(createLayer("Two"), JLayeredPane.DEFAULT_LAYER);
    desktop.add(createLayer("Three"), JLayeredPane.PALETTE_LAYER);

    frame.setSize(400, 200);
    frame.setVisible(true);

}

From source file:org.executequery.gui.editor.QueryEditor.java

public void addPopupComponent(JComponent component) {

    GUIUtilities.getFrameLayeredPane().add(component, JLayeredPane.POPUP_LAYER);
    GUIUtilities.getFrameLayeredPane().repaint();
}