Proszę o wskazanie błędu w kodzie:
public class Gra extends JFrame implements ActionListener {
int liczbaGraczy;
String[] podanieGracza = {"Pierwszy ", "Drugi ", "Trzeci ", "Czwarty ", "Piąty ", "Szósty "};
String[] choices = {"2", "3", "4", "5", "6"};
String[] imie;
// ...
Gra() {
String ilosc = (String) JOptionPane.showInputDialog(null,
"Wybierz liczbę graczy:", "Liczba graczy",
JOptionPane.QUESTION_MESSAGE, null, choices, choices[0]);
liczbaGraczy = Integer.parseInt(ilosc);
for(int i = 0; i<liczbaGraczy; i++){
imie[i] = JOptionPane.showInputDialog(podanieGracza[i] + "gracz:");
}
}
poprawienie tytułu wątku i dodanie znacznika <code class="java"> - fp