Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > combo box selection problem

Reply
Thread Tools

combo box selection problem

 
 
Jacques Chaurette
Guest
Posts: n/a
 
      05-31-2005
Hi, this has probably been asked before but I can't find any reference to
it. In this sample of code I am trying to set the index of a combo box from
an action_event triggered in another combo box.

I am having problems using the selectedIndex() method, sometimes it does not
work like in this code:

void jComboBoxFitSel_itemStateChanged(ItemEvent e) {

if (jComboBoxFitSel.getSelectedIndex() == 4)
{
jLabel6.setText("pass 4");
jComboDia.removeAllItems();
jComboDia.insertItemAt("2.0",0);
....
jComboDia.setSelectedIndex(0);
}
else
{
jLabel6.setText("pass not 4");
jComboDia.removeAllItems();
...
jComboDia.setSelectedIndex(3);
}

}
}
when either one of these conditons are filled the jComboDia.setSelectedIndex
command does not execute, is there some problem with trying to set an index
in a combo box from another combo box.

Cheers, thanks for any help.

Jack


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reference one combo box from another combo box SM Javascript 2 04-28-2007 04:49 PM
Fill Combo Box based on another Combo Box dthmtlgod ASP General 1 11-16-2005 04:08 PM
COMBO BOX INSTEAD OF DROP DOWN BOX =?Utf-8?B?QW5nZWw=?= ASP .Net 3 06-29-2004 06:38 PM
Populate List Box base on Combo Box Selection Adrian ASP General 1 02-18-2004 09:49 AM
Display User Selection From Combo Box rikesh ASP General 8 02-09-2004 01:58 PM



Advertisments