/** * This method initializes this * * @return void */ private void initialize() { int w = getDlgParams().rect.width; int h = getDlgParams().rect.height; jLayeredPane = new JLayeredPane(); add(jLayeredPane); jLayeredPane.setSize(w, h); jLayeredPane.setVisible(true); jLayeredPane.setOpaque(false); jTitle = new CustomLabel(); jTitle.setBounds(new Rectangle(5, 3, w, 16)); jTitle.setFont(new Font("Dialog", Font.BOLD, 14)); jTitle.setText("Current stack: "); this.setLayout(null); jLayeredPane.setLayout(null); jLayeredPane.add(jTitle, null); //jLayeredPane.add(jTitle2, null); jLayeredPane.add(getJButtonAccept(), null); jLayeredPane.add(getJButtonResponse(), null); makeTransparent(jLayeredPane); }
/** * Deactivate the glass pane. This is called by {@link #setVisible} when the * glass pane is hidden. */ protected void deactivate() { final JRootPane rootPane = SwingUtilities.getRootPane( this ); if ( rootPane != null ) { final JLayeredPane layeredPane = rootPane.getLayeredPane(); layeredPane.setVisible( true ); } final Component oldKeyboardFocusOwner = _oldKeyboardFocusOwner; if ( oldKeyboardFocusOwner != null ) { oldKeyboardFocusOwner.requestFocusInWindow(); _oldKeyboardFocusOwner = null; } }
decorationsPane.setBounds(0, 0, 484, 586); layeredPane.add(decorationsPane); decorationsPane.setVisible(true);
/** * Activate the glass pane. This is called by {@link #setVisible} when the * glass pane is made visible. */ protected void activate() { final JRootPane rootPane = SwingUtilities.getRootPane( this ); if ( rootPane != null ) { final KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); final Component focusOwner = keyboardFocusManager.getPermanentFocusOwner(); if ( ( focusOwner != null ) && SwingUtilities.isDescendingFrom( focusOwner, rootPane ) ) { _oldKeyboardFocusOwner = focusOwner; } final JLayeredPane layeredPane = rootPane.getLayeredPane(); layeredPane.setVisible( false ); requestFocusInWindow(); } }
rootPane.getLayeredPane().setVisible( false ); requestFocusInWindow(); rootPane.getLayeredPane().setVisible( true ); if( _recentFocusOwner != null )
this.layeredPane.setVisible(true); this.layeredPane.setOpaque(true); add(this.layeredPane);
glassPaneComposite.setVisible(true);