I have seen this tutorial: http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#combobox
But it defines a single combo box for the entire column. I would like to define different combo boxes for the different cells of the column.
For simplicity's sake, let's assume that there are n rows in the JTable
and the i'th column of the JTable
will be a column containing combo boxes. If I have a ComboBox
[] comboBoxes, where comboBoxes.length == n, how can I resolve that comboBoxes[0] will be the content of the [0][i]'th cell of the JTable
, comboBoxes[1] will be the [1][i]'th cell of the JTable
and so on, comboBoxes[n - 1] will be the [n - 1][i]'th cell of the JTable
. How can I achieve this?
Thanks.