Question: I'm trying to do a `floating design`, but when I resize my browser, the `<p>` tag next to the `<img>` tag starts laying out into a column, instead of going under the image.
You can see the code here -> <http://funkz.nfshost.com/>
It's in the "\*\*`main-bottom-post**" ID .`
I've also searched the net, but most articles are about the other way around -
making a column next to the img.
Thanks in advance,
M. K.

Answer: 
The second and third steps must NOT be done in the `doInBackground()` method, since they use Swing components and must thus be done in the event dispatch thread. They must be done in the `done()` method, if the login was successful. 

So your SwingWorker should rather be a `SwingWorker<Boolean, Void>`. The `doInBackground()` method should return true if the login was successful, and false if not:

```
SwingWorker<Boolean, Void> loginWorker = new SwingWorker<Boolean, Void>() {
    protected Boolean doInBackground() {
        return login();
    }

    protected void done() {
        try {
            boolean loginSuccessful = get();
            if (loginSuccessful) {
                updateGUI();
            }
        }
        catch (Exception e) {
            displayErrorMessage(e);
        }
    }
};

```
As Robin said, use return. In fact, step 1 should be done in a background thread while steps 2 and 3 in the event dispatch thread. So

```
protected Void doInBackground() {
    boolean success = login();
    this.setSuccess(success); // so that other thread knows whether you logged in
}

protected void done() {
    if (this.getSuccess()) {
//Change layout
//Add/remove panels.
    }
}

```