The comboBox below, or variable str stores the table name selected thorugh the dropdown of the combobox twice. System.out.println(str); outputs:
Also; constructor initialization in the related class (public class Dat extends AbstractTableModel) through dtable = new Dat(str); happens twice, and since I use the table name to open the table for reading, the table gets opened twice. I have not idea of what is going on? Could you please read my code?
posted 4 years ago
Use an ActionListener instead of an ItemListener.
An ItemListener has two states, selected/unselected.