How to display an ArrayList in a JPanel -


how can jlist show in jpenel. example i'd have following groups of items displayed in jpanel, each group showing on it's own column, new group being dropped new line, how google lists search results.

for example:

import java.util.arraylist; import java.util.list; import javax.swing.jpanel;   public class readerimpl {     jpanel paneto = new jpanel();      list<string> text() {         list<string> lovely = new arraylist<string>(4);             lovely.add("tall, short, average");         // line 1             lovely.add("mangoes, apples, bananas");     // line 2             lovely.add("12, 33");           return lovely;     }      // how add lovely arraylist paneto } 

a jlist renderer can draw checkbox, jlist does not support cell editor. instead, consider one-column jtable.

check out link here.

hope helps.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -