Centralizar o JInterframe

Olá, galera. Gostaria de saber se alguem sabe como centralizar o JInternalFram no canto superior ?

Nao sei se funcionar, mas tenta usar

setLocationRelativeTo();

null se for pra centralizar na tela do Desktop

Boa noite

Usa este metodo na classe do JInternalFrame

public void setPosicao(){
         Dimension d = this.getDesktopPane().getSize();
         this.setLocation((d.width - this.getSize().width)/2,
          (d.height - this.getSize().height)/2);
}

Exemplo quando chamar a janela interna:

if ((guiSobre == null) || (!guiSobre.isVisible())) {
          guiSobre = new GUISobre();
          desktopPane.add(guiSobre);
          guiSobre.setPosicao();
          guiSobre.setVisible(true);
}

Falow :wink: