public List<Player> getSelectedTeams() {
	if (result != JOptionPane.OK_OPTION) {
	    return null;
	}
	List<Player> teams = new ArrayList<>();
	for (int pos = 0; pos < teamModel.getSize(); pos++) {
	    teams.add(teamModel.getElementAt(pos));
	}
	return teams;
    }
public List < Player > getSelectedTeams ( ) { if ( result != JOptionPane . OK_OPTION ) { return null ; } List < Player > teams = new ArrayList < > ( ) ; for ( int pos = 0 ; pos < teamModel . getSize ( ) ; pos ++ ) { teams . add ( teamModel . getElementAt ( pos ) ) ; } return teams ; }
@return a list of paths to the players' code selected. If the dialog was cancelled, this
returns null