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 Beginning Java and the fly likes Displaying list/set in awt.List 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 » Beginning Java
Bookmark "Displaying list/set in awt.List" Watch "Displaying list/set in awt.List" New topic

Displaying list/set in awt.List

H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
hello guys

i was wondering if there is a method to display a list/set in an awt.List? i had a look at the API for java.awt.list but i only found this add() method! :roll: and this add method only displays an item, not the whole list

[ August 20, 2005: Message edited by: H Melua ]
Tom McC

Joined: Jul 28, 2005
Posts: 21

I as well looked at the API for it and couldn't find a way to add a whole array. If you can get away with using swing components, a JList has constructors that take arrays or Vectors as the beginning items. If not, you might be stuck with:
H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
thanks for replying tom, thats what i ended up doing for the mean time, but i dont feel its professional enough if there is better way of doing it, im not familiar with applets at all, im only learning at home!!

[ August 21, 2005: Message edited by: H Melua ]
jQuery in Action, 2nd edition
subject: Displaying list/set in awt.List
Similar Threads
List and set
Doubt in TreeSet
can we.....
How to catch a awt. List adjusting
Please help!! simple question