}))
.addControl(new Button("Continue >").onClicked(new Callback<ActionEvent>(){
public void call(ActionEvent event) {
stage.hide();
try {
Auth auth = authInterface.getToken(frob);
System.out.println("Authentication success");
// This token can be used until the user revokes it.
System.out.println("Token: " + auth.getToken());
String user_token = auth.getToken();
ChangeFlickrSettingsAction.this.context.getSettings().setProperty(FLICKR_USER_TOKEN,user_token);
String user_id = auth.getUser().getId();
ChangeFlickrSettingsAction.this.context.getSettings().setProperty(FLICKR_USER_ID,user_id);
System.out.println("nsid: " + auth.getUser().getId());
System.out.println("Realname: " + auth.getUser().getRealName());
System.out.println("Username: " + auth.getUser().getUsername());
System.out.println("Permission: " + auth.getPermission().getType());
} catch (FlickrException e) {
System.out.println("Authentication failed");
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.