Link to home
Start Free TrialLog in
Avatar of ColKavanagh
ColKavanagh

asked on

JScrollPane setText method

how do you use setText to add multiple additions to a Jscrollpane using a for loop.
I have
for(int i = 0; i < 10 ; i++){
     round.setText(vr.elementAt(i).toString() + "\n");
}

and the result I get is it just displays the last element of the vector vr.
why is it not displaying all the elements?
ASKER CERTIFIED SOLUTION
Avatar of vemul
vemul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Recommendation: Accept comment from vemul

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

DominicCronin
EE Cleanup Volunteer