Protect the table header when the pointer is outside.

This commit is contained in:
kruland2607 2014-05-22 13:44:44 -05:00
parent 35f9ae384e
commit 0042fb352b

View File

@ -18,6 +18,9 @@ public class ColumnTable extends JTable {
String tip = null;
java.awt.Point p = e.getPoint();
int index = columnModel.getColumnIndexAtX(p.x);
if ( index < 0 ) {
return null;
}
int realIndex = columnModel.getColumn(index).getModelIndex();
tip = ((ColumnTableModel) getModel()).getColumn(realIndex).getToolTip();
return tip;