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.
The menu lists the windows, and focuses them when clicked (Mentioned in Mac Human Interface Guidelines). They are common in most programs.
How could I do this? So far I think using a HashMap and WindowAdapters, that add and remove when windows appear, but I can't work out how to implement this.
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.