choice = (Targetable) choices.nextElement();
choice = choices.nextElement();
    private Targetable chooseTarget( Coords pos ) {        final Entity ce = ce();                        // Assume that we have *no* choice.        Targetable choice = null;        // Get the available choices.        Enumeration choices = client.game.getEntities( pos );        // Convert the choices into a List of targets.        Vector targets = new Vector();        while ( choices.hasMoreElements() ) {            choice = (Targetable) choices.nextElement();            if ( !ce.equals( choice ) ) {                targets.addElement( choice );            }        }        // Is there a building in the hex?        Building bldg = client.game.getBoard().getBuildingAt( pos );        if ( bldg != null ) {            targets.addElement( new BuildingTarget(pos, client.game.getBoard(), false) );        }        // Do we have a single choice?        if ( targets.size() == 1 ) {            // Return  that choice.            choice = (Targetable) targets.elementAt( 0 );        }        // If we have multiple choices, display a selection dialog.        else if ( targets.size() > 1 ) {            String[] names = new String[ targets.size() ];            String question = Messages.getString("MovementDisplay.ChooseTargetDialog.message", new Object[]{//$NON-NLS-1$                    pos.getBoardNum()});            for ( int loop = 0; loop < names.length; loop++ ) {                names[loop] = ( (Targetable)targets.elementAt(loop) ).getDisplayName();            }            SingleChoiceDialog choiceDialog =                new SingleChoiceDialog( clientgui.frame,                                        Messages.getString("MovementDisplay.ChooseTargetDialog.title"), //$NON-NLS-1$                                        question.toString(),                                        names );            choiceDialog.setVisible(true);            if ( choiceDialog.getAnswer() == true ) {                choice = (Targetable) targets.elementAt( choiceDialog.getChoice() );            }        } // End have-choices        // Return the chosen unit.        return choice;    } // End private Targetable chooseTarget( Coords )