This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Insert ArrayList value into a Jlist 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 "Insert ArrayList value into a Jlist" Watch "Insert ArrayList value into a Jlist" New topic
Author

Insert ArrayList value into a Jlist

Olof Sturesson
Greenhorn

Joined: Dec 10, 2013
Posts: 9

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!


In this moment, I am euphoric. Not because of any phony god's blessing. But because, I am enlightened by my intelligence.
Olof Sturesson
Greenhorn

Joined: Dec 10, 2013
Posts: 9

Okay I solved it with DefaultListModel.. I'm not exactly sure what my code is doing tho xD...




Could someone explain what




does?

Thanks
 
 
subject: Insert ArrayList value into a Jlist
 
Similar Threads
JList Autosearch with Custom Renderer
Java reading from utf-8 MySql problem
JList not refreshing ?issue?
SQL INSERT Statement in java
JSTL SQL tag related ..issue