Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Lists

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to the boys or girls,
I have a problem with two list box, one is for the user with half of the info, and there is another one with all of the detail. When I select one item it works fine, but when I want to select 2 or more it fails.
Here is the code :
String count[] = liist1.getItems();
for (int i = 0; i < count.length; i++)
{
if (list1.isIndexSelected(i) == true)
{
int item = list1.getSelectedIndex();
System.out.println("item" +item);
String aaa = list2.getItem(item);
list1.deselect(item);
System.out.println("String aaa" +aaa);
}
}
when it falls into the if statement my "int item" is -1 ......
...can you guys give me a hand
Phil
 
Philip Pross
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
don't worry ... found the bug , it works now!!
thanks anyway
    Bookmark Topic Watch Topic
  • New Topic