JTable Cell Editor missing one method?

R

RC

I am just wonder why in JTable

There are
TableCellEditor getCellEditor()
TableCellEditor getCellEditor(int row, int column)

But there is only

setCellEditor(TableCellEditor anEditor)

Why JTable doesn't have

setCellEditor(TableCellEditor anEditor, int row, int column) ?

What happen if I want to set each cell in a different editors?!
 
D

Daniel Pitts

RC said:
I am just wonder why in JTable

There are
TableCellEditor getCellEditor()
TableCellEditor getCellEditor(int row, int column)

But there is only

setCellEditor(TableCellEditor anEditor)

Why JTable doesn't have

setCellEditor(TableCellEditor anEditor, int row, int column) ?

What happen if I want to set each cell in a different editors?!
As I understand it, cell editors are free to return whatever component
needed for whatever cell. You would specify the component for the
row/column in the cellEditor, not specify the cell editor for that
row/column.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top