Thread java

Fermé
hammasaidi Messages postés 28 Date d'inscription lundi 1 février 2010 Statut Membre Dernière intervention 21 avril 2010 - 12 févr. 2010 à 00:22
 marwa.kb - 21 mai 2010 à 21:17
Bonjour,
j'ai développé un lecteur audio avec java swing mais j'ai une proléme avec le thread qui ne s'arrête pas avec la méthode stop()
voici la méthode actionPerformed
public void actionPerformed(ActionEvent e){
Lecture t = new Lecture();

if(e.getSource().equals(this.b_ouvrir))// bouton ouvrir
{
this.ouvrir();
}
if(e.getSource().equals(this.b_play))// bouton play
{
if(this.fichier == null)
{
this.ouvrir();
this.sound();

t.start();
}
else
{

this.sound();
t.start();
}
}
if(e.getSource().equals(this.b_stop))//bouton stop

{
this.sound();

t.stop();



}

}
merci pour vos aides
A voir également:

2 réponses

J'aurais un examen systeme d'exploitation(thread+java)i
j'ai revisé mais rien compri
0
svp tu peu me donner des exemple pr java thread
0