i want primary frame A to come to focus when the user clicks on it, but i also want secondary frame B to come up just behind it.

from within frame A, I write:

public void windowGainedFocus(WindowEvent e) {
if(windowB.getState() == Frame.ICONIFIED) windowB.setState(Frame.NORMAL);
windowB.toFront();
}

but i dont want window B in focus, i just want it visible. how can i do this?

thanks