jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes Trouble with DefaultListModel ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Trouble with DefaultListModel ..." Watch "Trouble with DefaultListModel ..." New topic
Author

Trouble with DefaultListModel ...

vijayender madura
Greenhorn

Joined: Jun 18, 2009
Posts: 13
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...


'Scientia est Potentia'
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble with DefaultListModel ...
 
Similar Threads
WA #1.....word association
Who is the top poster of "Ranch Hand"?
WA #2 ..... word association
Help
rich:tree working now... all the work has finally paid off - THANKS