How do I go about setting a JFrame class relative to another JFrame class?
I know that if I create a JFrame in the same class as the one I want to center I call setLocationRelativeTo(this)
, but due to the class getting long I cut it down into smaller JFrame classes.
So far i'm having to use setLocationRelativeTo(null)
to center it but this is not very good when I want the JFrame that is popping up to be ontop of the main JFrame.