Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. JJJacq

    jcombobox selecting item problem

    Hi Tim, yes this sounds like a good approach. I have never done a subclass before , is there an example somewhere? Cheers, Jack
  2. JJJacq

    jcombobox selecting item problem

    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")...
  3. JJJacq

    jcombobox selecting item problem

    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...
  4. JJJacq

    jcombobox selecting item problem

    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.
  5. JJJacq

    jcombobox selecting item problem

    woops again, my mistake, it works fine using exactly your code. Thanks.
  6. JJJacq

    jcombobox selecting item problem

    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...
  7. JJJacq

    jcombobox selecting item problem

    Tim, thanks very much, that works. It looks like listening and acting on events is a bit more complicated than I thought. Cheers, Jacques
  8. JJJacq

    jcombobox selecting item problem

    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
  9. JJJacq

    jcombobox selecting item problem

    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...

Part and Inventory Search

Back
Top