We are developing a rather big Java enterprise application with a traditional Swing client.
Every now and then, we facing the problem that random JDialogs and JFra
JFrames should not have "parents" as they are meant to be the "parent-most" window of an application. If you have a window that is meant to be a "child" and is therefore meant to be above another window, then it should be a dialog such as a JDialog or JOptionPane and should have its parent window set accordingly.
Try to add a FocusListener and listen for focus gained event where you can call yourWindow.toFront(). setAllwaysOnTop() could be interesting for you too.
I once had the same problem: The error was that the JDialog's/JFrame's parent was in fact not set properly. I set it to the parent of the parent, which caused the issue.