posted 17 years ago
I am newbie in Swing. I am developing a simple program to add 2 numbers. It contains 2 TextFields and 1 Button. When clicked on button, button handler will add 2 numbers in text fields and puts it in label, add it to the panel. (All components are panel, and panel is added to the frame.)
The problem is that after adding the label to the panel, I am calling repaint method on panel, or frame not updating the GUI. But, when I resize the window with mouse, it updating. If hiding the panel, or frame by using setVisible and making it visible again updating the GUI.
But, I didn't understand why repaint is not updating the GUI? Please give me some hints...