private void append(String str) {
        java.util.Date date = new java.util.Date();
        String leader = "" + new Timestamp(date.getTime());

        leader = String.format("%1$-" + 24 + "s", leader);

        str = leader + str + "\n";

        try {
            Document doc = debugText.getDocument();
            doc.insertString(doc.getLength(), str, null);

            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    JScrollBar vertical = scrollPane.getVerticalScrollBar();
                    vertical.setValue(vertical.getMaximum());
                }
            });
        } catch(BadLocationException e) {
            e.printStackTrace();
        }
    }