John Jai wrote:You are having only one label. So it shows the last set value using the setText() method in the for loop. You could either create 10 labels or add a button and an action listener to modify the text of the label to increment every time the button is clicked.
yes but if i go for 10 label and single for loop to print values all the 10 labels will end up with 9 9 9 the end values so alternate way is to create 10 labels and 10 for loops each with different end values so that label 1 will set 1 (which is an end value of 1st for loop ) label 2 will set 2 (which is an end value of 2nd for loop ) and so on ....but i want only 1 for loop and to print 1 to 10 on 10 different labels or on 1 single label
do you have any idea for that ?