List of usage examples for javax.swing JFrame getLayeredPane
public JLayeredPane getLayeredPane()
layeredPane
object for this frame. From source file:components.RootLayeredPaneDemo.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./*from w w w . j a v a2 s . c om*/ */ private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("RootLayeredPaneDemo"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Create and set up the content pane. RootLayeredPaneDemo newContentPane = new RootLayeredPaneDemo(frame.getLayeredPane()); newContentPane.setOpaque(true); //content panes must be opaque frame.setContentPane(newContentPane); //Display the window. frame.setSize(new Dimension(300, 350)); frame.setVisible(true); }
From source file:SoundManagerTest.java
/** * Draws all Swing components//from www.j a va 2 s .c o m */ public void draw(Graphics2D g) { JFrame frame = super.screen.getFullScreenWindow(); frame.getLayeredPane().paintComponents(g); }