I really need some help on this one, been struggling with this for days.
I have 4 jComboBox's in my code and the one is filled with clients and the other three are left blank. I have added an action listener on the clients jcombobox so that when the user selects a client, it calls a class and information is retrieved from the database and stored in a 2 dimensional array, after that the other three jcombobox's are filled with stuff like invoice id's amount's and dates.
So what I am trying to do is empty the jcombobox boxes in the action listener so that they when the class is called specific client information can be added to the other box's. this works perfect the first time round but the second I try and change a client from the first jcombobox I get this error:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
I am using jCombobox.removeAllItems()
and jCombobox.revalidate()
on the last three boxs.
please help if you can, much appreciated.