insert i variable from for loop in filename using java/ javafx -



insert i variable from for loop in filename using java/ javafx -

how able insert loop in imageview below, not replace 12 in file name can become;

imageview moon_img12 = new imageview(new image(getclass().getresourceasstream("/images/tiles/i.png")));

code:

for(int i=0; i<=total_donnation; i++) { imageview moon_img12 = new imageview(new image(getclass().getresourceasstream("/images/tiles/12.png"))); }

try

imageview[] moon_images = //init array

//loop

imageview moon_img = new imageview(new image(getclass().getresourceasstream("/images/tiles/"+i+".png

moon_images[i]= moon_img;

java javafx

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -