title: Java JList setting color of items
body: <p>could you please help me, how to change color of items showed in JList?</p>
  
  <p>I'm making an user JList where I can see online and offline users, and I need the offline users to have different colors than online users.</p>
  
  <p>My code for creating users</p>
  
  <pre><code>final String [] strings=database.getUsers(myLogin);  
  
  jList1.setModel(new javax.swing.AbstractListModel() {
       @Override
       public int getSize() { return strings.length; }
       @Override
       public Object getElementAt(int i) { return strings[i]; }
  });
  </code></pre>