From 587324d5efef51b06f1ac4cf6da14994bc5d62dd Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Sun, 28 Feb 2016 21:28:07 +0000 Subject: [PATCH] Fixed the currently playing song not being auto selected in the playlist. --- src/main/java/musicplayer/PlayerGUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }