{
BaculaNode sel = (BaculaNode)tree.selected();
if (b == close_b) {
// Close the window, and update the text box
try {
JSObject win = JSObject.getWindow(this);
String params1[] = { "" };
win.call("clear_files", params1);
for(int i=0; i<added.size(); i++) {
BaculaNode n = (BaculaNode)added.elementAt(i);
String params2[] = { n.path };
if (n.isdir && !n.path.equals("/"))
params2[0] = n.path+"/";
win.call("add_file", params2);
}
String params3[] = { "" };
win.call("finished", params3);
}
catch(Exception e) {
e.printStackTrace();
new ErrorWindow("Failed to set files : "+
e.getMessage());