/** 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 = segmentTable.getCellRect(index, 1, true);
   segmentTable.scrollRectToVisible(r);
   setTopLevelLocation();
   return new Point(
       (int) (r.getX() + topLevelLocation.getX()), (int) (r.getY() + topLevelLocation.getY()));
 }
 /**
  * Sets the starting address with the given address. This should display the relevant memory
  * segment (the data should be taken from the main memory gui).
  */
 public void setValueAt(int index, short value) {
   Rectangle r = segmentTable.getCellRect(index, 0, true);
   segmentTable.scrollRectToVisible(r);
   repaint();
 }