Yes, that's true the combo item in the 2nd combo do not need to change but I have added some calculations that are required when going from items 1 to 3.
if (e.getStateChange() == ItemEvent.SELECTED && e.getItem().equals(jComboBoxFitSel.getItemAt(4)))
{
//jLabel8.setText("pass 4")...
Huuum, can't seem to duplicate the error at this point. One thing that is happening is that I cannot get through the first condition if the first item selected in jComoboxFitSel is 0, 1 or 2 anything but 4. This is pretty obvious since the condition is only looking at item 4. The trick is how to...
Tim, thanks for all your advice. I am still having some problems with the code. Everything depends on whetther item 4 was selected or deselected. The problem is it is possible that item 0 is selected and then item 1 selected which produces an error.
woops, spoke too soon, the first condition works but not the second, it seems that I have to be very specific on the second condition such as:
else if (e.getStateChange() == ItemEvent.SELECTED && e.getItem().equals(jComboBoxFitSel.getItemAt(5)))
however I have many other items to which this...
Hi Tim, I know that the code executes but he jComboDia box should have an item selected during run time. It seems no item is selcted and the JComboDia box is blank. The jComboDia box does not have an actionListerner.
Cheers,
Jack
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.