Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Lists  RSS feed

 
Philip Pross
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!