I'm trying to use the method setOpacity but am getting the error

> 
> The method setOpacity(float) from the type Window is not visible
> 
> 
> 

Here is my full code

```
import javax.swing.JDialog;

public class TranslucentWindow {

    public static JDialog frame;

    public static void main(String[] args) {

        frame = new JDialog();
        frame.setUndecorated(true);
        frame.setVisible(true);
        frame.setOpacity(0.15f);
        frame.setLocation(0, 0);
        frame.setSize(100, 100);

    }

}

```

EDIT: My Java version

java version "1.6.0\_27"

OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)

OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

And Eclipse compiler was on 1.6 but I changed it to 1.7