How to center a new window

The fpmi.nav.centerWindow function will center a window over a main window. This requires that another window is opened and maximized. You are also probably using the mouseClicked event, so if you change that to the mousePressed or mouseReleased you won’t have to click twice.