Buggy code:
public class PresJeuSolo extends FenetreAbstraite implements ActionListener { private JComboBox themesList ; private JComboBox difficultesList ; private JLabel theme ; private JLabel difficulte ; private JLabel text ; private JButton bouton ; private JPanel jp1 ; private JPanel jp2 ; private JPanel jp3 ; int selectedCard = 0 ; private List < Card > selectedCards ; private int nbReturnedCards ; private int nbCards ; private List < Card > cards ; public PresJeuSolo ( String title ) { } public void initCards ( int nbCards ) { } protected String wavAccueil ( ) { } protected String wavRegleJeu ( ) { } protected String wavAide ( ) { } protected void init ( ) { } public void actionPerformed ( ActionEvent ae ) { voix . stop ( ) ; Object source = ae . getSource ( ) ; if ( source . equals ( bouton ) ) { String text = "Vous<seq2seq4repair_space>avez<seq2seq4repair_space>appuyé<seq2seq4repair_space>sur<seq2seq4repair_space>le<seq2seq4repair_space>bouton<seq2seq4repair_space>commencer" ; voix . playText ( text ) ; } this . requestFocus ( ) ; } public void setPairCards ( ) { } public void keyPressed ( KeyEvent e ) { } public void changeColor ( ) { } public void changeSize ( ) { } public class CardsListener implements ActionListener { public void actionPerformed ( ActionEvent e ) { Card sourceCard = ( ( Card ) ( e . getSource ( ) ) ) ; sourceCard . turn ( ) ; voix . playWav ( sourceCard . getSon ( ) , true ) ; <START_BUG> sourceCard . setEnsteabled ( false ) ; <END_BUG> sourceCard . setDisabledIcon ( new ImageIcon ( sourceCard . getImage ( ) ) ) ; selectedCards . add ( sourceCard ) ; if ( ( selectedCards . size ( ) ) == 2 ) { if ( selectedCards . get ( 0 ) . getImage ( ) . equals ( selectedCards . get ( 1 ) . getImage ( ) ) ) { selectedCards . get ( 0 ) . setEnabled ( false ) ; selectedCards . get ( 0 ) . setDisabledIcon ( new ImageIcon ( selectedCards . get ( 0 ) . getImage ( ) ) ) ; selectedCards . get ( 1 ) . setEnabled ( false ) ; selectedCards . get ( 1 ) . setDisabledIcon ( new ImageIcon ( selectedCards . get ( 0 ) . getImage ( ) ) ) ; selectedCards = new ArrayList ( ) ; voix . playWav ( "..//ressources//sons//reussite.wav" , true ) ; nbReturnedCards += 2 ; if ( ( nbReturnedCards ) == ( nbCards ) ) { bouton . setVisible ( true ) ; voix . stop ( ) ; voix . playText ( "Appuyez<seq2seq4repair_space>maintenant<seq2seq4repair_space>sur<seq2seq4repair_space>le<seq2seq4repair_space>bouton<seq2seq4repair_space>commencer<seq2seq4repair_space>pour<seq2seq4repair_space>lancer<seq2seq4repair_space>la<seq2seq4repair_space>partie" ) ; bouton . addActionListener ( new PresJeuSolo . startGameListener ( ) ) ; } } else { voix . playWav ( "..//ressources//sons//echec.wav" , true ) ; List < Card > disabledCards = new ArrayList < > ( ) ; for ( Card c : cards ) { if ( ! ( selectedCards . contains ( c ) ) ) { disabledCards . add ( c ) ; c . setEnabled ( false ) ; c . setDisabledIcon ( new ImageIcon ( c . dosCarte ) ) ; } } int delay = 2000 ; Timer timer = new Timer ( ) ; timer . schedule ( new TimerTask ( ) { public void run ( ) { selectedCards . get ( 0 ) . turn ( ) ; selectedCards . get ( 0 ) . setEnabled ( true ) ; selectedCards . get ( 1 ) . turn ( ) ; selectedCards . get ( 1 ) . setEnabled ( true ) ; selectedCards = new ArrayList < Card > ( ) ; for ( Card c : disabledCards ) { c . setEnabled ( true ) ; } } } , delay ) ; } } requestFocus ( ) ; } } private class startGameListener implements ActionListener { public void actionPerformed ( ActionEvent e ) { String difficulte = ( ( String ) ( difficultesList . getSelectedItem ( ) ) ) ; int cardsForGame = 0 ; switch ( difficulte ) { case "Facile" : cardsForGame = 12 ; break ; case "Moyen" : cardsForGame = 18 ; break ; case "Difficile" : cardsForGame = 24 ; break ; } JeuSolo frameSoloGame = new JeuSolo ( "Partie<seq2seq4repair_space>Solo" , cardsForGame ) ; dispose ( ) ; } } }

Fix:
sourceCard . setEnabled ( false ) ;