Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic