title: Can't transparent and undecorated JFrame in JDK7 when enabling nimbus
body: <p>Look at this picture :
  <img src="https://i.stack.imgur.com/39t12.png" alt="Transparent JFrame  "></p>
  
  <p>here is the code that transparent's the frame:</p>
  
  <pre><code>GraphicsEnvironment ge = 
          GraphicsEnvironment.getLocalGraphicsEnvironment();
          GraphicsDevice gd = ge.getDefaultScreenDevice();
  
          if (!gd.isWindowTranslucencySupported(TRANSLUCENT)) {
              System.err.println(
                  "Translucency is not supported");
                  System.exit(0);
          }
  
          JFrame.setDefaultLookAndFeelDecorated(true);
  </code></pre>
  
  <p>this works good but when trying to enable LookAndFeel by adding </p>
  
  <pre><code>    try {
      for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
           if ("Nimbus".equals(info.getName())) {
              javax.swing.UIManager.setLookAndFeel(info.getClassName());
              break;
            }
      }
  }catch(.......)
  </code></pre>
  
  <p>it gives me this error </p>
  
  <blockquote>
    <p>Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: The frame is decorated</p>
  </blockquote>
  
  <p>What's this error ? and how to solve it ? </p>
  
  <p>Thanks for your answers and suggestions.</p>
  
  <p>EDIT</p>
  
  <p>Question Asked/CrossPosted</p>
  
  <ul>
  <li><p><a href="https://forums.oracle.com/forums/thread.jspa?threadID=2533181&amp;tstart=0" rel="nofollow noreferrer">OTN</a></p></li>
  <li><p><a href="http://www.daniweb.com/software-development/java/threads/454088/undecorated-translucent-and-shaped-window-in-java7#" rel="nofollow noreferrer">Daniweb</a></p></li>
  <li><p><a href="http://www.coderanch.com/t/611044/GUI/java/Undecorated-Translucent-Shaped-Window-Java" rel="nofollow noreferrer">CodeRanch</a></p></li>
  </ul>