public final BrowserWidget openNewBrowserWindow()
throws UnableToCompleteException {
boolean succeeded = false;
Shell s = createTrackedBrowserShell();
try {
BrowserWidget bw = PlatformSpecific.createBrowserWidget(getTopLogger(),
s, browserHost);
if (mainWnd != null) {
Rectangle r = mainWnd.getShell().getBounds();
int n = browserShells.size() + 1;
s.setBounds(r.x + n * 50, r.y + n * 50, 800, 600);
} else {
s.setSize(800, 600);
}
if (!isHeadless()) {
s.open();
}
bw.onFirstShown();
succeeded = true;
return bw;
} finally {
if (!succeeded) {
s.dispose();