I want to update JLabel with setText() method, but when I update it, text shows like this:
Asked
Active
Viewed 297 times
1 Answers
0
This is caused by not having a layout manager and not setting the location of the labels. By not setting any location for the labels they have defaulted 0 (x) and 0 (y), there for they are on top of one another. To set the location of a label do label.setlocation(x, y);
and to set a layout manager do frame.setLayout(Type layout manager here);

RealINandOUT
- 51
- 6