So here's my problem: I need to instantiate Images inside a loop, but the URL doesn't work, it keeps throwing the 'url not found' error...
That's my code :
for (int k=0; k<=10; k++){
String nb=String.valueOf(k);
nombres[k]= new Image(getClass().getResourceAsStream("resource/"+nb+".png"));
boutons[k]= new Button();
boutons[k].setGraphic(new ImageView(nombres[k]));
}
I'm waiting for your advice?