This content has been marked as final. Show 2 replies
In particular, when you use regular Swing Components in a "GridBagLayout", they size themselves to fit the layout.Not exactly. The layout manager sizes them, and the component take their current size into account when painting themselves.
So the problem is "only" the latter part: see http://download.oracle.com/javase/tutorial/uiswing/painting/index.html
And when you change a parameter (like "setValue"), they redraw themselves with the new parameter without being explicitly told to do so.Most probably because the setter calls repaint(), or sends a PropertyChangeEvent that the component's UI handles by calling repaint().
I'll work through that link and post a new thread if anything else arises.