[Solved] Dynamically changing contents of ListCellRenderer


You shouldn’t pass a newFeedReader() to setCellRenderer();
A ListCellRenderer is an object used to paint cells, not to be used as a database kind of object.
What you’re going to want to do is,

  • Get all of the statuses at the beginning
  • Pass them as an array to a JList
  • Then create a custom ListCellRenderer class and in your getListCellRendererComponent method, return your JLabel which has your ListCellRenderer code

4

solved Dynamically changing contents of ListCellRenderer