Java Swing 点击事件异步执行

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();

    }
});
Swing

我来吐槽

*

*