Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wrldwzrd89

macrumors G5
Original poster
Jun 6, 2003
12,110
77
Solon, OH
For some reason, when I call setText multiple times on the same JLabel, the messages overlap one another and become unreadable. The first message displays just fine, but subsequent messages don't.

I've tried overwriting the current message with spaces before displaying a new message, calling invalidate() then validate(), and calling repaint(). None of those helped. :confused:
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
Have you tried removing the JLabel from your panel/frame first before updating it? (Not just setting it to nulls or all blanks, but actually removing it and re-adding it)

Todd
 

wrldwzrd89

macrumors G5
Original poster
Jun 6, 2003
12,110
77
Solon, OH
Have you tried removing the JLabel from your panel/frame first before updating it? (Not just setting it to nulls or all blanks, but actually removing it and re-adding it)

Todd
That doesn't help, nor does removing it, recreating it, then adding it again.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.