title: Swing - Menu With Open Windows
body: <p>For user convenience, and after reading user interface guidelines, I would like a JMenu with Items as open Windows in my program, e.g. different (non-modal) dialogs/frames.  </p>
  
  <p>The menu lists the windows, and focuses them when clicked (Mentioned in Mac Human Interface Guidelines). They are common in most programs.</p>
  
  <p>How could I do this? So far I think using a <em>HashMap</em> and <em>WindowAdapters</em>, that add and remove when windows appear, but I can't work out how to implement this.</p>
  
  <p>Note - I have a main frame, and dialogs that are called in separate classes from the main frame which would have the menu. Sorry, no especially relevant code that helps explain. I am aware of Window.getWindows() but unsure how this would be used.</p>