Hi java experts...
I have already placed JComboBox inside a JTable.
But now my problem is that i want to check/uncheck all the
ComboBoxes in a single stretch when i clicked a checkbox
named CheckAll which is placed in the JFrame.
Plz help me...
Thankx in advance...
# 1
> I have already placed JComboBox inside a JTable.
> But now my problem is that i want to check/uncheck
> all the
> ComboBoxes in a single stretch when i clicked a
> checkbox
> named CheckAll which is placed in the JFrame.
>
> Plz help me...
> Thankx in advance...
There are hundreds of different ways of accomplishing this... depending on how you have your data stored, wether using the DefaultTableModel or have extended AbstractTableModel.
We need a little more to go on.
Post a small, compilable example of your code that demonstrates the problem you are experiencing and maybe we can help.
PS. Don't forget to use the code fomatting tags
# 2
> I have already placed JComboBox inside a JTable.
So you have set the defaultCellEditor of the column, right?
Then you can just use the setValueAt(,,) method of the table model to set the values in the cells.
Liketable.getModel().setValueAt( checked , row , column );
# 3
> I have already placed JComboBox inside a JTable.
> But now my problem is that i want to check/uncheck
> all the
> ComboBoxes in a single stretch when i clicked a
> checkbox
> named CheckAll which is placed in the JFrame.
what do you mean by check/uncheck? are you talking about check box?