The getFullyVisibleRowCount in the KTable library counts one too many rows when there is a row which is cut off by the widget's size (e.g. if you have two data rows and the second row is not fully visible, the method will still return two).
This bug causes the table to not show the last row sometimes and not allow you to scroll down to see it. Here is a fix for the method:
private int getFullyVisibleRowCount(int fixedHeight) {
Rectangle rect = getClientArea();
ScrollBar sb = getHorizontalBar();
if (sb != null)
rect.height-=sb.getSize().y;
int count = 0;
int heightSum = fixedHeight;
heightSum+=m_Model.getRowHeight(m_TopRow);
for (int i=m_TopRow + 1; heightSum<rect.height; i++) {
count++;
heightSum+=m_Model.getRowHeight(i);
}
return count;
}
In this updated code, I account for the first row's height before I count it as a fully visible row. I have tested this in a KTable rich application, but I am not 100% sure that all features of KTable remain unscathed. But at least this method returns the correct results.