public class ManoUserInfo implements UserInfo {
String passwd;
public void setPassword(String pass) {
passwd = pass;
}
@Override
public String getPassphrase() {
return null;
}
public String getPassword() {
return passwd;
}
public boolean promptPassword(String arg0) {
return true;
}
public boolean promptPassphrase(String arg0) {
return true;
}
//this method responsible for that message, so just make it return true
public boolean promptYesNo(String arg0) {
// Object[] options = {"yes", "no"};
/* int foo = JOptionPane.showOptionDialog(null,
arg0,
"Warning",
JOptionPane.DEFAULT_OPTION,
JOptionPane.WARNING_MESSAGE,
null, options, options[0]);*/
return true;
}
public void showMessage(String message) {
JOptionPane.showMessageDialog(null, message);
}
`或找到一种方法来自动按“是”每当这个问题弹出(这可以用很短的脚本像AutoIt的3工具箱实现).`这是我很感兴趣的部分,我阅读你的文章中的所有其他内容,这就是为什么我要求一个答案我不知道该怎么做 – London 2011-01-13 13:31:34