So my code is supposed to display a dialog box that has choices on it and the user is supposed to choose. Whichever the user chooses, it will display a certain portion of a file as an array, which then sparks another choice for the user out of that portion. I don't know exactly what I am doing and I have tried everything to the best of my knowledge.
ArrayList<String> position = new ArrayList<String>();
int pick = 1;
boolean checkForSameStrings = false;
for(int pickCount = 0; pickCount < numOfTeams; pickCount++)
{
String pickPosition = JOptionPane.showInputDialog(null, "What position do you plan on drafting?");
for(int checkForSameArrayStrings = 0; checkForSameArrayStrings < positionLabel.size(); checkForSameArrayStrings++)
{
while(numOfTeams.equals(position.get(checkForSameArrayStrings)))
{
String nextPick;
checkForSameStrings = true;
nextPick = JOptionPane.showInputDialog(null, "Please enter a different team
position " + pick);
break;
}
}
position.add(pickPosition);
System.out.println(position.get(pickCount));
pick++;
}