I've never used an array of JLabels, but I have had to change the text of existing JLabels. For this, use the method setText(
String t). (Have you tried this? How are you trying to set the text?)
The way to use the JLabel methods is:
Then add this to your content frame. I see no reason why this couldn't be extended to an array of JLabels updated from an array of Strings. One warning though: if you try to
initialize the JLabel from the user's input, the compiler will complain.
Hope this helps. If not, please post the code for the loop you're using, and I'll see if I can find the problem. Please be sure to use the UBB tags for code.
[ October 21, 2003: Message edited by: Jeff Bosch ]
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4 all those years ago...)