public void log(final String txt) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                synchronized (txtLog) {
                    txtLog.append(txt);
                }
            }
        });
    }