/** Returns the coordinates of the top left corner of the value at the given index. */
 public Point getCoordinates(int index) {
   JScrollBar bar = scrollPane.getVerticalScrollBar();
   Rectangle r = pinsTable.getCellRect(index, 2, true);
   pinsTable.scrollRectToVisible(r);
   return new Point(
       (int) (r.getX() + topLevelLocation.getX()),
       (int) (r.getY() + topLevelLocation.getY() - bar.getValue()));
 }
Beispiel #2
0
 public void adjustmentValueChanged(AdjustmentEvent e) {
   offset = scrollBar.getValue();
   table.tableChanged(cEvent);
 }