Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to set JLabel text from an array

843785Oct 25 2008 — edited Oct 25 2008
I several JLabels that correspond to the elements in an array. Is there a way to loop through the array and set the text of the labels for example:
Label names are description1JLabel throught description10JLabel the text in array[ 0 ] would be set to the first label array[ 1 ] to the second and so on.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2008
Added on Oct 25 2008
2 comments
2,421 views