Non ho capito bene quello che intendi. Dici che dovrei fare una cosa del genere:
codice:public void Repaint() { th = new MyThread(); th.start(); try { Thread.sleep(100); n1=(int)(6*Math.random()); n2=(int)(6*Math.random()); n3=(int)(6*Math.random()); n4=(int)(6*Math.random()); n5=(int)(6*Math.random()); this.repaint(); Thread.sleep(100); n1=(int)(6*Math.random()); n2=(int)(6*Math.random()); n3=(int)(6*Math.random()); n4=(int)(6*Math.random()); n5=(int)(6*Math.random()); this.repaint(); Thread.sleep(100); n1=(int)(6*Math.random()); n2=(int)(6*Math.random()); n3=(int)(6*Math.random()); n4=(int)(6*Math.random()); n5=(int)(6*Math.random()); this.repaint(); height=this.getHeight(); width=this.getWidth(); this.Repaint(); } catch (InterruptedException e) { th.setStop(true); } }

Rispondi quotando