@Override public void setVisible(boolean visible) { super.setVisible(visible); if (visible) { // Log us the hell in Runnable onLogin = new CatchingRunnable() { public void doRun() throws Exception { // If the tracks haven't loaded yet, show the welcome when they have shownLogin = true; if (tracksLoaded) showWelcome(false); } }; final LoginSheet lp = new LoginSheet(RobonoboFrame.this, onLogin); showSheet(lp); if (isNonEmpty(lp.getEmailField().getText())) { invokeLater( new CatchingRunnable() { public void doRun() throws Exception { lp.tryLogin(); } }); } } }