JPanel panelList = new JPanel(new GridLayout(1, 2, 5, 0));
JScrollPane scrollPaneSong, scrollPaneAlbum;
panelList.add(scrollPaneSong = new JScrollPane(songs,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED));
scrollPaneSong.addMouseWheelListener(new MouseWheelListener() {
public void mouseWheelMoved(MouseWheelEvent arg0) {
if (configure.update && !configure.lastValueSong.equals("") && updateSong == null && configure.songs.size() - 1 == songs.getLastVisibleIndex() && arg0.getUnitsToScroll() > 0){
updateSong();
}
}
});
panelList.add(scrollPaneAlbum = new JScrollPane(albums = new JList(modelAlbums = new DefaultListModel()),
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED));
scrollPaneAlbum.addMouseWheelListener(new MouseWheelListener() {
public void mouseWheelMoved(MouseWheelEvent arg0) {
if (configure.update && !configure.lastValueAlbum.equals("") && updateAlbum == null && configure.albums.size() - 1 == albums.getLastVisibleIndex() && arg0.getUnitsToScroll() > 0){
updateAlbum();
}