void (@NotNull JWindow window) { // disable -Dswing.bufferPerWindow=true for the window JComponent rootPane = window.getRootPane(); if (rootPane != null) { rootPane.setDoubleBuffered(false); } JComponent contentPane = (JComponent)window.getContentPane(); if (contentPane != null) { contentPane.setDoubleBuffered(false); } //noinspection UseJBColor window.setBackground(new Color(1, 1, 1, 0)); }