// have to display once to get the correct size
int width = findBox.getWidth();
boolean needsRelocate = (width <= 0);
int x = loggerOrigin.x + dim.width - width;
int y = loggerOrigin.y + dim.height - findBox.getHeight();
PopupFactory popupFactory = PopupFactory.getSharedInstance();
// TODO(jat): need to track window resize?
findPopup = popupFactory.getPopup(SwingLoggerPanel.this, findBox, x, y);
findPopup.show();
if (needsRelocate) {
x = loggerOrigin.x + dim.width - findBox.getWidth();
y = loggerOrigin.y + dim.height - findBox.getHeight();
findPopup.hide();
findPopup = popupFactory.getPopup(SwingLoggerPanel.this, findBox, x, y);
findPopup.show();
}
searchField.requestFocusInWindow();
}