diff --git a/src/main/java/musicplayer/PlayerGUI.java b/src/main/java/musicplayer/PlayerGUI.java index d22582f..658088e 100644 --- a/src/main/java/musicplayer/PlayerGUI.java +++ b/src/main/java/musicplayer/PlayerGUI.java @@ -141,7 +141,7 @@ public class PlayerGUI implements PlayerCallbackInterface, LibraryCallbackInterf @Override public void setSongHighlighting(Song playingSong) { int index = playlistTableModel.getSongIndex(playingSong); - playList.setRowSelectionInterval(index, index); + SwingUtilities.invokeLater(() -> playList.setRowSelectionInterval(index, index)); playlistTableModel.setPlayingRow(index); }