public void paintHex( Point aHexIx, Color aColor, boolean aToggle)
   {
      if (0 <= aHexIx.x && aHexIx.x < myHexGrid.getNumHorizHexes()
            && 0 <= aHexIx.y && aHexIx.y < myHexGrid.getNumVertHexes())
      {
         Hex hex = myHexGrid.getHexes()[ aHexIx.x][ aHexIx.y];
         if (aToggle)
         {
            if (hex.getBackgroundColor() == null)
               hex.setBackgroundColor( aColor);
            else
               hex.setBackgroundColor( null);
         }
         else
            hex.setBackgroundColor( aColor);
         
         Rectangle2D.Double hexBox = hex.getBounds2D();
         Point2D.Double lower = new Point2D.Double( hexBox.x, hexBox.y);
         Point2D.Double upper = new Point2D.Double( hexBox.x + hexBox.width,
            hexBox.y + hexBox.height);
         Point2D.Double[] xformedPts = new Point2D.Double[2];
         getLastTransform().transform( new Point2D.Double[] { lower, upper },
            0, xformedPts, 0, 2);
         int x, y, width, height;
         x = (int) Math.floor( xformedPts[ 0].x);
         y = (int) Math.floor( xformedPts[ 0].y);
         width = (int) (Math.ceil( xformedPts[ 1].x) - x);
         height = (int) (Math.ceil( xformedPts[ 1].y) - y);
         repaint( x, y, width, height);
      }
   }