This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JList in NetBeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JList in NetBeans" Watch "JList in NetBeans" New topic
Author

JList in NetBeans

vinderela mistery
Greenhorn

Joined: Jan 02, 2013
Posts: 7
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

Joined: Oct 16, 2003
Posts: 1076
    
  10

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?


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
vinderela mistery
Greenhorn

Joined: Jan 02, 2013
Posts: 7
I have a JList in interface, and I want to populate in program:

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> 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

Joined: Jan 02, 2013
Posts: 7

Thanks.
 
Don't get me started about those stupid light bulbs.
 
subject: JList in NetBeans
 
Similar Threads
Drag and Drop
JList question
JLIST Store and retreive data to Properties
selecting topics to get help information
Serializing/deserializing a list