Strange behaviour of Swing

I'm trying to fix the 3 problem of 3, and now I can't do it myself, unfortunately. Let me try one more time)

Here is a small piece of code:

public void clearSelection() {
    sel = null;
    if (children.size() > 0) {
        for (int i = 0; i < children.size(); i++) {
    } else if (words != null) {
        for (int i = 0; i < words.size(); i++) {
            Component[] c = words.get(i).getComponents();
            for (int j = 0; j < c.length; j++) {
                JLabel l = new JLabel(((JLabel)c[j]).getText());
                words.get(i).add(l, 0);

words is a Vector containing JPanels, which in turn contain JLabels - individual letters.

What I want to do is to reset a selection (make all labels not opaque, give them a transparent background color, recreate them from scratch, whatever - I need to get rid of the blue highlightning).

What's happening when I run this code? Nothing, until I minimize and then restore the frame. Only after that I see the changes.

If I uncomment words.get(i).forceRepaint(); line nothing happens (it is a method that drops the image buffer and calls the rendering code). If I uncomment the last line nothing will hapen either.

But if I uncomment the 2 lines before the last one (and no matter what I do with the other code) - all text disappears from my blocks after click (this method is registered on the mousePressed event) if and only if I leave the remove call uncommented (the consequent add call seems to not work at all), and it doesn't go back. If I comment both the remove and add calls, these 2 lines also do nothing to refresh the state.

What's the bug here?