// component can be a custom-painted JComponent static JWindow showAlwaysOnTopTranslucentWindow(Rect bounds, Color backgroundWithAlpha, JComponent component default null) { ret swing(() -> { new JWindow f; f.setAlwaysOnTop(true); int alpha = 128; f.setBackground(new Color(0,255,0, alpha)); f.setBounds(toRectangle(bounds)); add(f, component); f.setLocationRelativeTo(null); f.setVisible(true); ret f; }); }