E' impossibile che venga eseguito setUp().
Prova a guardare questo semplicissimo esempio che ho scritto al volo:
Non chiamo alcun validate() né repaint().codice:import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Mio extends JFrame { private class Tempo extends Thread { public void run() { try { sleep(5000); cambiaLabel(); } catch (Exception e) { e.printStackTrace(); } } } private JLabel lbl; public Mio() { getContentPane().setLayout( null ); lbl = new JLabel("Prova"); lbl.setBounds(30, 30, 130, 20); getContentPane().add( lbl ); setDefaultCloseOperation(EXIT_ON_CLOSE); setTitle("Prova"); setSize(500, 500); setVisible(true); ( new Tempo() ).start(); } private void cambiaLabel() { lbl.setText("Label Cambiata"); } public static void main(String [] args) { Mio m = new Mio(); } }
Faccio partire un thread che cambia la JLabel dopo 5 secondi. E funziona perfettamente.
Ciao.![]()



Rispondi quotando