JScrollPane and JList auto scroll

后端 未结 7 1621
无人共我
无人共我 2020-12-16 14:33

I\'ve got the next code:

    listModel = new DefaultListModel();
    listModel.addElement(dateFormat.format(new Date()) + \": Msg1\");
    messageList = new          


        
7条回答
  •  孤城傲影
    2020-12-16 15:15

    I found this really useful: http://forums.sun.com/thread.jspa?threadID=623669 (post by 'inopia')
    It works perfectly

    As he says: "The problem here is that it can become a bit difficult to find an event that fires after both the ListModel, JList and JScrollPane have been updated."

提交回复
热议问题