public void updateLobby(Map<String, String[]> lobbyGames) {
        // Keep track of whether the user is currently in a game        
        boolean isAlreadyInGame = false;
        
        DefaultTableModel model = (DefaultTableModel) lobby_table.getModel();
        
        // Delete previous data
        model.setRowCount(0);
        
        for (Map.Entry<String, String[]> game : lobbyGames.entrySet()) {
            String rowData[] = new String[5];
            rowData[0] = game.getKey();
            
            String playerNames[] = game.getValue();
            
            for (int i = 0; i < playerNames.length; i++) {
                if (playerNames[i] != null && playerNames[i].equals(username)) {
                    isAlreadyInGame = true;
                }
                rowData[i + 1] = playerNames[i];
            }
            
            // Add the game to the lobby table
            model.addRow(rowData);
        }
        
        btnCreateGame.setEnabled(!isAlreadyInGame);
        btnJoinGame.setEnabled(!isAlreadyInGame && 
                               lobby_table.getSelectedRow() != -1);
        btnLeaveGame.setEnabled(isAlreadyInGame &&
                                lobby_table.getSelectedRow() != -1);
    }