/**
* do export of highlighted template
*/
private void doExport() {
Template template = templateList.getSelectedValue();
if(template != null){
JFileChooser chooser = new JFileChooser();
chooser.setFileFilter(new FileFilter(){
public boolean accept(File f) {
return f.isDirectory() || f.getName().endsWith(".template");
}
public String getDescription() {
return "Template XML File";
}
});
chooser.setSelectedFile(new File(template.getName()+".template"));
int r = chooser.showSaveDialog(frame);
if(r == JFileChooser.APPROVE_OPTION){
try{
File f = chooser.getSelectedFile();
FileOutputStream out = new FileOutputStream(f);