Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JList in NetBeans

 
vinderela mistery
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I need to use JList in NetBeans. I added a JList in interface. I try to populate the JList and I used some code from docs.oracle.com, but in JList I receive the value from definite model in interface. How I can change the value to the list? Please help me to solve this problem.

Regards,
Vinderela
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi vinderela,
Your post is not clear enough for us to offer solutions. Can you post your code which would show how you setup the model?
 
vinderela mistery
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JList in interface, and I want to populate in program:

 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> How I can change the value to the list

create a new listModel, same way as initial code.
then:
list.setModel(newListModel);
 
vinderela mistery
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic