private void gameListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_gameListMouseClicked
        // Get the selected game list item
        int index = gameList.locationToIndex(evt.getPoint());
        
        GameListItem item = (GameListItem) gameModel.get(index); 
        
        // See if the selected state should be fired
        if(evt.getClickCount() >= 2 || evt.getX() < 17){
            // Enable the apply button because something's state has changed
            if( !applyBtn.isEnabled())
                applyBtn.setEnabled(true);
            
            // Toggle selected state
            boolean selected = ! item.isSelected();
            item.setSelected(selected);
            
            // Enable/Disable tabs as needed
            int tabIndex = Utils.getIndex(builtInGames, item.getID());
            if(tabIndex != -1 
                    && selected != gameSettingsTabPane.isEnabledAt(tabIndex))
                gameSettingsTabPane.setEnabledAt(tabIndex, selected);
            
            // Re-build the active games array
            int len = gameModel.size(), activeCount = 0;
            activeGames = new byte[len];
            for(int i=0; i<len; i++){
                item = (GameListItem) gameModel.get(i);
                if(item.isSelected()){
                    activeGames[activeCount] = item.getID();
                    activeCount++;
                }
            }
            activeGames = Arrays.copyOf(activeGames, activeCount);
            
            // Save the active games array in the prefs
            prefs.put(Config.Key.active_tabs.toString(), implode(activeGames));

            // Repaint cell
            gameList.repaint(gameList.getCellBounds(index, index));
        }
    }//GEN-LAST:event_gameListMouseClicked