• Post Reply Bookmark Topic Watch Topic
  • New Topic

Insert ArrayList value into a Jlist

 
Olof Sturesson
Greenhorn
Posts: 9
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all! I'm new to java, netbeans and it's GUI...

As the topic says; how do I insert my ArrayList Strings value into a Jlist? . I've tried append (which probably will never work) and addElement as methods, but it's still not working. says "Cannot find symbol" if I hover the mouse over addElement...



Hopefully you understand what I'm talking about! ;)

Thanks in advance!
 
Olof Sturesson
Greenhorn
Posts: 9
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay I solved it with DefaultListModel.. I'm not exactly sure what my code is doing tho xD...




Could someone explain what




does?

Thanks
 
Maybe he went home and went to bed. And took this tiny ad with him:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!