Hi All,
I have an issue similar to thread269-1403865
I have a combo box that pulls data from sql database. After a new record is inserted I would like the combobox to display the new information. The following pseudo-code breaks down the steps.
JComboBox edit_key_list = new JComboBox();
//method invoked that pulls the data and puts it into the combo box
//component is added
//action event called where new info is inserted
edit_key_list.addItem(new_event); //in action performed
I have tried re-calling the data load method after the new data is inserted but I cannot re-add the component to the panel. I am thinking I will have to make the app multi-threaded. But it would be a P.I.T.A. for something this simple. I tried using repaint() & update() as well as a long shot.
So would there be a way to make this happen without making the app multi-threaded?
Thanks
I have an issue similar to thread269-1403865
I have a combo box that pulls data from sql database. After a new record is inserted I would like the combobox to display the new information. The following pseudo-code breaks down the steps.
JComboBox edit_key_list = new JComboBox();
//method invoked that pulls the data and puts it into the combo box
//component is added
//action event called where new info is inserted
edit_key_list.addItem(new_event); //in action performed
I have tried re-calling the data load method after the new data is inserted but I cannot re-add the component to the panel. I am thinking I will have to make the app multi-threaded. But it would be a P.I.T.A. for something this simple. I tried using repaint() & update() as well as a long shot.
So would there be a way to make this happen without making the app multi-threaded?
Thanks