java - How to display ArrayList items in a JComponent -


i have this:

arraylist lovely = new arrylist(4); lovely.add("tall, short, average");         // line 1 lovely.add("mangoes, apples, bananas");     // line 2 lovely.add("this, that");                   // line 3 lovely.add(“1, 2, 3, 4, 5, 6”)              // line 4 

i'd have array list displayed in such way each category shows in own line, how google list search results. know how this? i'd such displayed in jcomponent, not sure of 1 use, nor how this. java programmers use jtextfields , jtextpanes, or use.

help here appreciated.

java programmers use jlist. can constuct this:

new jlist(lovely.toarray()) 

it displays each item in separate line in list.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -