btnCreate.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
btnCreate.setEnabled(false);
new SwingWorker<StringBuilder, String>(){
@Override
protected StringBuilder doInBackground() throws Exception {
actionCreate();
return null;
}
@Override
protected void process(List<String> chunks) {
super.process(chunks);
}
@Override
protected void done() {
super.done();
btnCreate.setEnabled(true);
}
}.execute();
}
});