title: Dynamically show and hide JFrame decorations
body: <p>I am developing a Java Swing-based application with different perspectives. For the "main menu" perspective I do not want the window (JFrame) to be decorated, while in other perspective I do want the window to be decorated. In other words, I need want to change the decoration attribute dynamically.</p>
  
  <p>I have tried to use <code>setUndecorated(false)</code> and <code>setUndecorated(true)</code>, but I seems I can only set this once, before actually showing the window. </p>
  
  <p>Is there a way to achieve this?</p>