Resolvido

0 respostas
janjan
Thread thread=new Thread(){
        public void run(){
            int x;
            int p;
            x=jButton1.getVerticalAlignment();
            p=jButton1.getHorizontalAlignment();
            int novaP1=0;
            int novaP2=0;
            novaP1=(int)Math.random()*x;
            novaP2=(int)Math.random()*p;
            
            this.jButton1.setLocation(novaP1,novaP2);//o erro da somente nesta linha, e o botao esta criado no frame.
        }
        
    };
Criado 25 de setembro de 2008
Respostas 0
Participantes 1