private static String askForPassword(Locatable original) {
KongaPasswordField field = new KongaPasswordField(20);
OneColumnPanel col = layoutQuestion(original, field);
KongaDialog dialog = createDialog(field, col);
dialog.setVisible(true);
return dialog.wasOkPressed() ? new String(field.getPassword()) : null;
}
private static OneColumnPanel layoutQuestion(Locatable original, KongaPasswordField field) {
OneColumnPanel col = new OneColumnPanel();
col.setInsets(0, 0, 10, 0);