title: Is The Java Tutorials Translucent Window example giving trouble to those playing with jdk7?
body: <p>Here's the <a href="http://download.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html#uniform" rel="noreferrer">example</a>. </p>
  
  <p>If you build and run <code>TranslucentWindow</code> in let's say, NetBeans IDE 7.0, which supports jdk7, you'll get the following exception:</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: The frame is decorated
      at java.awt.Frame.setOpacity(Frame.java:960)
      at main.TranslucentWindow.&lt;init&gt;(TranslucentWindow.java:23)
      at main.TranslucentWindow$1.run(TranslucentWindow.java:47)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
      at java.awt.EventQueue.access$000(EventQueue.java:101)
      at java.awt.EventQueue$3.run(EventQueue.java:666)
      at java.awt.EventQueue$3.run(EventQueue.java:664)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
  BUILD SUCCESSFUL (total time: 1 second)
  </code></pre>
  
  <p>According to this stack trace, the offending line is <code>tw.setOpacity(0.55f)</code>. But, as the error indicates, if you invoke <code>setUndecorated(true)</code> on the frame, then it won't throw the exception and will create a translucent window, albeit without any decoration (which is a pain). Is this normal? Shouldn't this code run right "out-of-the-box"? Am I overlooking something?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Why does their translucent window appear decorated, or is this custom rendering?</p>
  
  <p><strong><em>What it is...</em></strong></p>
  
  <p><img src="https://i.stack.imgur.com/Bi7Wc.png" alt="enter image description here"></p>
  
  <p><strong><em>What it should be...</em></strong></p>
  
  <p><img src="https://i.stack.imgur.com/31nZo.png" alt="enter image description here"></p>