I'm having a problem updating the ComboBox. The ComboBox is filled using a Vector containing a name, the contents of the Vector are cast to Strings, and displayed in the ComboBox. However, a problem arises when an item is removed from the Vector list, the ComboBox does not update Is there an easy way to update this. The Vector itself is defined in a seperate class. Thanks for the help, Kevin
Here's some of my code. The first method is called to edit an item in the vector The second method is in another class (EditCard). I'm getting the following error A:\AlumniList.java:89: non-static method updateComboBox(int) cannot be referenced from a static context
I hate to be a pain. I just can't seem to get around this whole JComboBox thing (this is my first attempt to use swing). My problem now is that I'm allowing the user to select an item from the comboBox, edit, or delete the item. And using the index position from the comboBox changing the Vector, and then changing the list in the comboBox. I'm now getting a NullPointerException, when trying to pass the index position to a method which will update the comboBox.
I know the updateComboBox method isnt correct, I need to get the listName.toArray() (since I'm using a Vector in order to display a readable choice), but I just want to get it working, its starting to drive me crazy!!!