• 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

cant get large selection in Jlist to do 'something'

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
after adding a few items to Jlsit i can remove many item in one go:



however when i try and get the item to do carry out a method, it doesnt seem to work,

however it only does the first one eg
if ive selected 3 items, 5,6, and 7, it would do the method 3 times on item 5
or if ive slect 4 items, 2,3,4,and 5 it would do the method 4 times on item 2
and not on the rest of the item,

what am i doing wrong.
 
Rancher
Posts: 3324
32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where in you loop do you actually get a selected item from the list?
 
shaon husain
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Camick wrote:Where in you loop do you actually get a selected item from the list?



i cannot just simply add



when i do there isnt anything i can do.
 
Rob Camick
Rancher
Posts: 3324
32
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try the getSelectedValues() method?
 
shaon husain
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Camick wrote:Did you try the getSelectedValues() method?



when i do list.getSelectedValues(), i get a line through it, and it doesnt work, in my case,
reply
    Bookmark Topic Watch Topic
  • New Topic