update message list immediately
This commit is contained in:
parent
83e97ecfba
commit
ec159b92d5
1 changed files with 7 additions and 13 deletions
|
@ -26,14 +26,14 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: MessageList.java,v 1.4 2007/04/04 07:47:02 fros4943 Exp $
|
* $Id: MessageList.java,v 1.5 2008/09/20 08:05:29 fros4943 Exp $
|
||||||
*
|
*
|
||||||
* -----------------------------------------------------------------
|
* -----------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne, Fredrik Osterlind
|
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne, Fredrik Osterlind
|
||||||
* Created : 2006-06-14
|
* Created : 2006-06-14
|
||||||
* Updated : $Date: 2007/04/04 07:47:02 $
|
* Updated : $Date: 2008/09/20 08:05:29 $
|
||||||
* $Revision: 1.4 $
|
* $Revision: 1.5 $
|
||||||
*/
|
*/
|
||||||
package se.sics.cooja.dialogs;
|
package se.sics.cooja.dialogs;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
@ -50,7 +50,6 @@ import javax.swing.DefaultListModel;
|
||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.ListModel;
|
import javax.swing.ListModel;
|
||||||
import javax.swing.ListSelectionModel;
|
import javax.swing.ListSelectionModel;
|
||||||
import javax.swing.SwingUtilities;
|
|
||||||
|
|
||||||
public class MessageList extends JList {
|
public class MessageList extends JList {
|
||||||
|
|
||||||
|
@ -106,12 +105,7 @@ public class MessageList extends JList {
|
||||||
String readLine;
|
String readLine;
|
||||||
try {
|
try {
|
||||||
while ((readLine = stringInput.readLine()) != null) {
|
while ((readLine = stringInput.readLine()) != null) {
|
||||||
final String line = readLine;
|
addMessage(readLine, type);
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
addMessage(line, type);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// Occurs when write end closes pipe - die quietly
|
// Occurs when write end closes pipe - die quietly
|
||||||
|
|
Loading…
Add table
Reference in a new issue