title: Java Swing JDialog Transparency
body: <p>I have been having this problem for quite some time and I've been unable to find the solution anywhere on the internet.</p>
  
  <p>I have a JDialog as my main frame and I need to be able to change the transparency of the window. Normally this would not be a problem if I was to call setUndecorated(true) on it, but I do not want to do that. I want the title bar to appear at the top under the system look and feel. </p>
  
  <p>The interesting part is that on my Mac, changing the transparency works just fine with the system look and feel, even though the JDialog is still "decorated".</p>
  
  <p>Here's an image of my JDialog so you know what I'm dealing with:</p>
  
  <p><img src="https://i.stack.imgur.com/lUOq6.png" alt="Image"> </p>
  
  <p>I need to use the system look and feel, but I also need to be able to change the transparency of the window. </p>
  
  <p>When I try, I get the following exception on windows:</p>
  
  <p>"Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: The dialog is decorated"</p>
  
  <p>If I set it to undecorated, I lose the title bar at the top which is not an option. Anybody know a way around this?</p>