[DÚVIDA] setLocation

Uso sempre no construtor

this.setLocation(x,y);

para a GUI Swing aparecer no meio da tela, porém isso varia de monitor, alguns ficam no centro outros nao.

Tem como colocar alguma porcentagem ai ??

exemplo

this.setLocation(50%,50%);
this.setLocationRelativeTo(null);

=)

[quote=tsalsicha]this.setLocationRelativeTo(null);

=)[/quote]

Boa tarde,

this.setLocationRelativeTo(this); // PASSE COMO PARAMETRO O VALOR THIS