/** Creates new form CombatDialog */ public CombatDialog() { JPanel contentPane = new JPanel() { private static final long serialVersionUID = -8283955788355547309L; public void paintComponent(Graphics g) { g.setColor(new Color(50, 50, 50, 100)); g.fillRect(0, 0, getWidth(), getHeight()); } }; setContentPane(contentPane); initComponents(); this.setModal(false); combatArea.setOpaque(false); jScrollPane1.setOpaque(false); jScrollPane1.getViewport().setOpaque(false); getRootPane().setOpaque(false); //setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE); }
@Override protected JRootPane createRootPane() { JRootPane rootPane = new JRootPane() { private boolean packing = false; @Override public void validate() { super.validate(); if (!packing) { packing = true; pack(); packing = false; } } }; rootPane.setOpaque(true); return rootPane; } };
protected JRootPane createRootPane() { JRootPane rootPane= new JRootPane() { private boolean packing= false; public void validate() { super.validate(); if (!packing) { packing= true; pack(); packing= false; } } }; rootPane.setOpaque(true); return rootPane; } };
@Override protected JRootPane createRootPane() { JRootPane rp = new JRibbonRootPane(); rp.setOpaque(true); return rp; }
/** * The {@code JRootPane} for this View. All of the components for this * View must be added to its rootPane. Most applications will do so * by setting the View's {@code component}, {@code menuBar}, {@code toolBar}, * and {@code statusBar} properties. * * @return The {@code rootPane} for this View * @see #setComponent * @see #setMenuBar * @see #setToolBar * @see #setStatusBar */ public JRootPane getRootPane() { if (rootPane == null) { rootPane = new JRootPane(); rootPane.setOpaque(true); } return rootPane; }
/** * Gets the {@code JRootPane} for this View. All of the components for this * View must be added to its rootPane. Most applications will do so * by setting the View's {@code component}, {@code menuBar}, {@code toolBar}, * and {@code statusBar} properties. * * @return The {@code rootPane} for this View * @see #setComponent * @see #setMenuBar * @see #setToolBar * @see #setStatusBar */ public JRootPane getRootPane() { if (rootPane == null) { rootPane = new JRootPane(); rootPane.setOpaque(true); } return rootPane; }
/** * Called by the constructor to set up the <code>JRootPane</code>. * * @return a new <code>JRootPane</code> * @see javax.swing.JRootPane */ protected JRootPane createRootPane() { JRootPane pane = new JRootPane(); // by default, the subclass BorderLayout cause memory leak if isPopupVolatile in AbstractComboBox. pane.getContentPane().setLayout(new BorderLayout()); pane.setOpaque(false); // on Nimbus L&F, JRootPane is opaque by default. So we have to set it to false explicitly. return pane; }
customRootPane.setOpaque(true); customRootPane.putClientProperty("apple.awt.brushMetalLook", true); // required by Quaqua.ToolBar.style=title UIManager.put("Quaqua.ToolBar.style", "title");
public AbstractCustomView() { hideView(); loadingView = LoadingView.getLoadingView(); updateThread = getUpdateThread(); getRootPane().setOpaque(false); getContentPane().setBackground(Color.decode(DEFAULT_DIALOG_BACKGROUND)); }
//original source: Sun, java/awt/Window.java, setLayersOpaque(Component, boolean) private static void setLayersTransparent(JFrame frame) { JRootPane root = frame.getRootPane(); root.setOpaque(false); root.setDoubleBuffered(false); Container c = root.getContentPane(); if (c instanceof JComponent) { JComponent content = (JComponent) c; content.setOpaque(false); content.setDoubleBuffered(false); } frame.setBackground(new Color(0, 0, 0, 0)); }
lp.setOpaque(false); root.putClientProperty(TRANSPARENT_OLD_OPAQUE, Boolean.valueOf(root.isOpaque())); root.setOpaque(false); if (content != null) { content.putClientProperty(TRANSPARENT_OLD_OPAQUE, Boolean.valueOf(content.isOpaque())); lp.setOpaque(Boolean.TRUE.equals(lp.getClientProperty(TRANSPARENT_OLD_OPAQUE))); lp.putClientProperty(TRANSPARENT_OLD_OPAQUE, null); root.setOpaque(Boolean.TRUE.equals(root.getClientProperty(TRANSPARENT_OLD_OPAQUE))); root.putClientProperty(TRANSPARENT_OLD_OPAQUE, null); if (content != null) {
/** * Creates new form JRecordingAreaFrame */ public JRecordingAreaFrame() { // The following two lines must be executed before the window // heavyweight component is created. setAlwaysOnTop(true); setUndecorated(true); getRootPane().putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE); setBackground(backgroundColor); JContentPane cp = new JContentPane(); setContentPane(cp); getRootPane().setOpaque(true); cp.setOpaque(false); initComponents(); infoLabel.addMouseListener(handler); infoLabel.addMouseMotionListener(handler); cp.addMouseListener(handler); cp.addMouseMotionListener(handler); //infoLabel.setBackground(new Color(0, true)); infoLabel.setOpaque(false); infoPanel.setBorder(new EraseBorder(new Insets(8, 10, 8, 10))); //infoLabel.setBackground(new Color(0x88000000, true)); infoLabel.setForeground(new Color(0xffffff)); closeButton.setOpaque(false); setSize(600, 400); updateLabel(); }
/** Creates new form JRecordingAreaFrame */ public JRecordingAreaFrame() { // The following two lines must be executed before the window // heavyweight component is created. setAlwaysOnTop(true); setUndecorated(true); getRootPane().putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE); setBackground(backgroundColor); JContentPane cp = new JContentPane(); setContentPane(cp); getRootPane().setOpaque(true); cp.setOpaque(false); AWTUtilities.setWindowOpaque(this, false); initComponents(); infoLabel.addMouseListener(handler); infoLabel.addMouseMotionListener(handler); cp.addMouseListener(handler); cp.addMouseMotionListener(handler); //infoLabel.setBackground(new Color(0, true)); infoLabel.setOpaque(false); infoPanel.setBorder(new EraseBorder(new Insets(8, 10, 8, 10))); //infoLabel.setBackground(new Color(0x88000000, true)); infoLabel.setForeground(new Color(0xffffff)); closeButton.setOpaque(false); setSize(600, 400); updateLabel(); }
root.putClientProperty(TRANSPARENT_OLD_OPAQUE, Boolean.valueOf(root.isOpaque())); root.setOpaque(false); if (content != null) { content.putClientProperty(TRANSPARENT_OLD_OPAQUE, lp.setOpaque(Boolean.TRUE.equals(lp.getClientProperty(TRANSPARENT_OLD_OPAQUE))); lp.putClientProperty(TRANSPARENT_OLD_OPAQUE, null); root.setOpaque(Boolean.TRUE.equals(root.getClientProperty(TRANSPARENT_OLD_OPAQUE))); root.putClientProperty(TRANSPARENT_OLD_OPAQUE, null); if (content != null) {
protected AbstractOverlaidFrame() { super("MercuryTrade"); if (!this.getClass().equals(MercuryLoadingFrame.class)) { this.framesConfig = Configuration.get().framesConfiguration(); this.applicationConfig = Configuration.get().applicationConfiguration(); this.scaleConfig = Configuration.get().scaleConfiguration(); } this.getRootPane().setOpaque(false); this.setUndecorated(true); this.setLocationRelativeTo(null); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setBackground(AppThemeColor.FRAME); this.setFocusableWindowState(false); this.setFocusable(false); this.setAlwaysOnTop(true); this.setVisible(false); this.prevState = FrameVisibleState.HIDE; this.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { AbstractOverlaidFrame.this.repaint(); } }); MercuryStoreCore.frameVisibleSubject.subscribe(state -> SwingUtilities.invokeLater(() -> this.changeVisible(state))); }