• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying list/set in awt.List

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

thanks
hannah
[ August 20, 2005: Message edited by: H Melua ]
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
H,

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
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!

thanks
hannah
[ August 21, 2005: Message edited by: H Melua ]
 
I like tacos! And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic