mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-1398 fixed UiThreadViolation in scrollToBottom
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12550 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
holger.bergunde
parent
589494f15d
commit
409934c2c9
@ -22,6 +22,7 @@ package org.jivesoftware.spark.ui;
|
||||
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 abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user