Sad to say, there is no direct way to do so. The only way around this would be to override prepareRenderer() of a object, getting the JTableComponent object returned and set the tooltip value for that cell. Check the code below.
|
1 2 3 4 5 6 7 8 9 10 |
JTable table = new JTable() { public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { Component c = super.prepareRenderer(renderer, row, column); if (c instanceof JComponent) { JComponent jc = (JComponent) c; jc.setToolTipText((String) getValueAt(row, column)); } return c; } }; |