I am trying to update a JLabel by using the setText() method, but I can\'t redraw JLabel. Do I have to use the repaint() method to do that?
setText()
repaint()
repaint() won't work here.
Simply use label_name.paintImmediately(label_name.getVisibleRect());
label_name.paintImmediately(label_name.getVisibleRect());
It will get updated right away.