Хорошо, я нашел решение: в конструкторе я написал:
for (short idxComp=3; idxComp<tList.getComponentCount(); idxComp++)
{
tList.getComponentAt(idxComp).addFocusListener(this);
}
isTableSelected = false;
А вот реализованные методы:
public void pointerPressed(int x, int y)
{
int startX, startY, endX, endY, nbComps;
nbComps = tList.getComponentCount();
startX = tList.getComponentAt(3).getAbsoluteX();
endX = tList.getComponentAt(5).getAbsoluteX() + tList.getComponentAt(5).getWidth();
startY = tList.getComponentAt(3).getAbsoluteY();
endY = tList.getComponentAt(nbComps-1).getAbsoluteY() + tList.getComponentAt(nbComps-1).getHeight();
if ( (x >= startX && x <= endX) && (y >= startY && y <= endY) )
{
isTableSelected = true;
if ( (x >= selectedComp.getAbsoluteX() && x <= (selectedComp.getAbsoluteX()+selectedComp.getWidth())) && (y >= selectedComp.getAbsoluteY() && y <= (selectedComp.getAbsoluteY()+selectedComp.getHeight())) )
afficheFicheCredit(selectedRow);
}
}
public void focusGained(Component comp) {
tList.repaint();
selectedComp = tList.getComponentAt(3*selectedRow+3);
if (isTableSelected)
{
isTableSelected = false;
selectedRow = tList.getSelectedRow();
afficheFicheCredit(selectedRow);
}
}