What is actually the key difference of \[code\]JWindow\[/code\] vs. \[code\]JFrame\[/code\] vs. \[code\]JDialog\[/code\] in Java/Swing?Using \[code\]JWindow\[/code\] as first attempt to produce an independent window for Java/Swing, I ran into window manager and focus problems like this one for Compiz. This can be evaded by using \[code\]JFrame\[/code\] or \[code\]JDialog\[/code\] instead, with suitable modification for defaults, such as window decoration.So in some sense all three classes look like they could imitate each other to a large extent, apart from subtle differences in the interaction with the operating system environment.Is there some method behind this confusion, or is it just normal JDK code duplication accumulated by different development teams over time?