• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble with DefaultListModel ...

 
vijayender madura
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having trouble with the following piece of code. Can anyone help spot what is going wrong ? The list items on the JList that uses the _listModel below does not get added for the first time when the components are intantiated. On subsequent attempts the list is populated correctly.


for (BoyActivity boy : boyActivities) {
_listModel.addElement(boy.getNotes());
}

Thanks for the help in advance...
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Insufficient information. To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.

Also, use the code tags to post code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic