private void updateRanking() {
        final String[] columns = {"name", "W", "D","L", "P" };
        final Class[] classes = {String.class, Integer.class, Integer.class, Integer.class, Integer.class};
        
        // create ordered list of players, ordered by points gained
        final Set<Player> players = new TreeSet<>(new Comparator<Player>() {
            @Override
            public int compare(Player o1, Player o2) {
                int result0 = getResult(o1);
                int result1 = getResult(o2);
                int compare = Integer.compare(result0, result1);
                if (compare == 0) {
                    return o1.getName().compareToIgnoreCase(o2.getName());
                } else {
                    return compare;
                }
            }
        });
        
        for(Game game: schedule) {
            players.add(game.first);
            players.add(game.second);
        }
        
        rankingTable.setModel(new TableModel() {
            
            @Override
            public int getRowCount() {
                return players.size();
            }
            
            @Override
            public int getColumnCount() {
                return columns.length;
            }
            
            @Override
            public String getColumnName(int columnIndex) {
                return columns[columnIndex];
            }
            
            @Override
            public Class<?> getColumnClass(int columnIndex) {
                return classes[columnIndex];
            }
            
            @Override
            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return false;
            }
            
            @Override
            public Object getValueAt(int rowIndex, int columnIndex) {
                Player[] h = players.toArray(new Player[0]);
                if (columns[columnIndex].equals("name"))
                    return h[rowIndex].getName();
                else {
                    return "0";
                }
            }
            
            @Override
            public void setValueAt(Object aValue, int rowIndex, int columnIndex) { }
            @Override
            public void addTableModelListener(TableModelListener l) {  }
            @Override
            public void removeTableModelListener(TableModelListener l) { }
        });
    }