I have a Java swing application with a button that produces a popup window when a certain action is performed. I\'d like to align the center point of the popup window with
You can utilize event e to get parent window. Use getWindowAncestor and e.getSource().
e
getWindowAncestor
e.getSource()
dialog.setLocationRelativeTo(SwingUtilities.getWindowAncestor((Component) e.getSource()))