Original Post
Ok I'm changing my previous question to a much simpler one
For some odd reason I have a JComboBox actionDo all set up with a model. But when I try something like actionDo.setSelectedItem(myObject) it doesn't set it to that object. Yes it is uneditable, but myObject is one of the preexisting items that I can set actionDo to. If I want to to it the long hard way I can put in a for loop that runs thru actionDo's every item and compares it to myObject and if they are equal strings I just set actionDo's selected index to the index I compared. But really, why should I have to go thru all this?
Can anyone shed some light on this. I'm not very knowledgeable with ComboBox's in Java, but what I do know is that most sources say this should work.
For some odd reason I have a JComboBox actionDo all set up with a model. But when I try something like actionDo.setSelectedItem(myObject) it doesn't set it to that object. Yes it is uneditable, but myObject is one of the preexisting items that I can set actionDo to. If I want to to it the long hard way I can put in a for loop that runs thru actionDo's every item and compares it to myObject and if they are equal strings I just set actionDo's selected index to the index I compared. But really, why should I have to go thru all this?
Can anyone shed some light on this. I'm not very knowledgeable with ComboBox's in Java, but what I do know is that most sources say this should work.