Is it possible to create a transparent color overlay in Java? It should also cover the taskbar and toolbar. The following code does not work. It just creates a black window in full screen.
public class Overlay extends Window {
private static final long serialVersionUID = 1 L;
public Overlay(Window owner) {
super(owner);
}
public void show() {
try {
setVisible(true);
setBackground(new Color(0, 0, 0, 0.5 f));
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(this);
} catch (Exception error) {
// Error
}
}
}
Thanks!