sclass ScreenOverlay is AutoCloseable { JWindow window; Color bgColor = colorWithAlpha(Color.blue, .5); settable Rect bounds; settable bool hideOnMouseOver; settable Component component; void show() swing { if (window == null) { if (usingJTattoo()) warn("Screen overlays don't really work with JTattoo"); assertNotNull(+bounds); window = new JWindow; window.setBackground(bgColor); main setBounds(window, bounds); window.setAlwaysOnTop(true); if (component != null) window.add(component); disposeWindowOnClick(window); if (hideOnMouseOver) addMouseListener(getContentPane(window), new MouseAdapter { @Override public void mouseEntered(MouseEvent e) { hide(); } }); } window.setVisible(true); } public void hide aka close() swing { if (window == null) ret; window.setVisible(false); } }