//Center the window
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = frame.getSize();
        if (frameSize.height > screenSize.height) {
            frameSize.height = screenSize.height;
        }
        if (frameSize.width > screenSize.width) {
            frameSize.width = screenSize.width;
        }
        frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
        frame.setVisible(true);


At 09:30 08/01/2003 -0200, you wrote:
alguem tem akele peda�o de codigo classico pra alinhar um frame/jframe no
centro da tela do desktop?

[]'s
________________________
Bruno Cesar Borges [miojo]
Programador Java Semi-Pleno
ICQ: 8584744
MSN: [EMAIL PROTECTED]
*RUMO* ao Sun Certified Programmer for the Java 2 Platform 1.4

_______________________________________________________________________
Busca Yahoo!
O melhor lugar para encontrar tudo o que voc� procura na Internet
http://br.busca.yahoo.com/

---------------------------------------------------------------------
Para cancelar a subscri��o, envie mensagem para: [EMAIL PROTECTED]
Para comandos adicionais, envie mensagem para: [EMAIL PROTECTED]

        Rafael Leite
        Analista de Sistemas - SAFF
        Softplan/Poligraph
        Sistema da Qualidade Certificado - ISO 9001 - BVQI - INMETRO
        Fone/Fax: 0xx(48) 3027-8000
        http://www.softplan.com.br

Responder a