views:

66

answers:

0

On a JTable in Java, how do I set the accessible text on a column, row and/or cell?

Normally you would do component.getAccessibleContext().setAccessibleName(text); and that is what JAWS would read upon focusing, but a table "cell" doesn't seem to exist, and columns (from the ColumnModel) do not implement Accessible.

I've tried doing something like

table.getAccessibleContext().getAccessibleTable().setAccessibleColumnDescription(0, new JLabel(table.getColumnName(0)));

but it didn't work.

Any suggestions?