I have a GUI screen, and it has a label in it. I now want to set the label with a text as i have shown in below (Test
). But it\'s not getting updated. I think t
The way you use your code does not trigger a repaint of your frame or label. In Swing you can change many Gui Objects, but they are only redrawn in a single batch when requested. The most usual case when a repaint occurs automatically, is after you return from an event handler. (E.g. a button click or key press)