Clignoter un composant SWT
Selon ce post : http://www.developpez.net/forums/sho...d.php?t=486065 on ne peut avec un timer modifié l'interface il faut utiliser syncExec et syncExec :
Code:
1 2 3 4 5 6
| display.syncExec(
new Runnable() {
public void run(){
label.setText(text);
}
}); |
mais j'ai du mal à voir comment je peux l'utiliser, peut-on me conseiller svp ?
dommage que ceci marche pas :aie: :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| ActionListener taskPerformer = new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
//GestionMultimedia.this.clignotePrix();
if ( GestionMultimedia.this.labelPrix.getVisible() )
GestionMultimedia.this.labelPrix.setVisible(false);
else
GestionMultimedia.this.labelPrix.setVisible(true);
}
};
TimerPrix = new Timer(500, taskPerformer);
TimerPrix.start(); |