swing - Java - jList sometimes not updating correctly? -


this code:

defaultlistmodel modelplayers = (defaultlistmodel)game.window.jlistplayers.getmodel(); defaultlistmodel modelplayersgame = (defaultlistmodel)game.window.jlistplayersingame.getmodel(); modelplayers.clear(); modelplayersgame.clear(); for(string s : getplayersfromarray(p.content[0])) {      modelplayers.addelement(s);      modelplayersgame.addelement(s); }   private string[] getplayersfromarray(string array) {     return array.split(","); } 

sometimes content of list disappears , appears again (after update).

i have checked p.content[0] contained player1, player2 should not problem.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -