diff --git a/src/java/org/jivesoftware/spark/ui/ChatRoom.java b/src/java/org/jivesoftware/spark/ui/ChatRoom.java index 2c4ce2cd5..1f0cc210c 100644 --- a/src/java/org/jivesoftware/spark/ui/ChatRoom.java +++ b/src/java/org/jivesoftware/spark/ui/ChatRoom.java @@ -22,6 +22,7 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; +import java.awt.EventQueue; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; @@ -616,8 +617,15 @@ public void scrollToBottom() { transcriptWindow.setCaretPosition(lengthOfChat); try { - JScrollBar scrollBar = textScroller.getVerticalScrollBar(); - scrollBar.setValue(scrollBar.getMaximum()); + final JScrollBar scrollBar = textScroller.getVerticalScrollBar(); + EventQueue.invokeLater(new Runnable() { + + @Override + public void run() { + scrollBar.setValue(scrollBar.getMaximum()); + } + }); + } catch (Exception e) {