Skip to content

Commit

Permalink
Use spaces as indentation consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
norrisjeremy authored and mwiede committed Sep 6, 2022
1 parent 85bfc37 commit b18dccb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions examples/JumpHosts.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,35 +79,35 @@ public static class MyUserInfo implements UserInfo, UIKeyboardInteractive{
public String getPassword(){ return passwd; }
public boolean promptYesNo(String str){
Object[] options={ "yes", "no" };
int foo=JOptionPane.showOptionDialog(null,
int foo=JOptionPane.showOptionDialog(null,
str,
"Warning",
JOptionPane.DEFAULT_OPTION,
"Warning",
JOptionPane.DEFAULT_OPTION,
JOptionPane.WARNING_MESSAGE,
null, options, options[0]);
return foo==0;
}

String passwd;
JTextField passwordField=(JTextField)new JPasswordField(20);

public String getPassphrase(){ return null; }
public boolean promptPassphrase(String message){ return true; }
public boolean promptPassword(String message){
Object[] ob={passwordField};
Object[] ob={passwordField};
int result=
JOptionPane.showConfirmDialog(null, ob, message,
JOptionPane.OK_CANCEL_OPTION);
JOptionPane.showConfirmDialog(null, ob, message,
JOptionPane.OK_CANCEL_OPTION);
if(result==JOptionPane.OK_OPTION){
passwd=passwordField.getText();
return true;
passwd=passwordField.getText();
return true;
}
else{ return false; }
}
public void showMessage(String message){
JOptionPane.showMessageDialog(null, message);
}
final GridBagConstraints gbc =
final GridBagConstraints gbc =
new GridBagConstraints(0,0,1,1,1,1,
GridBagConstraints.NORTHWEST,
GridBagConstraints.NONE,
Expand Down Expand Up @@ -149,7 +149,7 @@ public String[] promptKeyboardInteractive(String destination,
gbc.gridy++;
}

if(JOptionPane.showConfirmDialog(null, panel,
if(JOptionPane.showConfirmDialog(null, panel,
destination+": "+name,
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE)
Expand All @@ -158,7 +158,7 @@ public String[] promptKeyboardInteractive(String destination,
for(int i=0; i<prompt.length; i++){
response[i]=texts[i].getText();
}
return response;
return response;
}
else{
return null; // cancel
Expand Down

0 comments on commit b18dccb

Please sign in to comment.