@Override
  protected void paintComponent(Graphics gg) {
    Graphics3D g = Graphics3D.create(gg);

    w = (getWidth() - (leftGap + gap * hand.size())) / hand.size();
    int h = getHeight() - 2 * gap;

    int x = leftGap;
    int y = gap;
    Font font = new Font("Arial", Font.BOLD, 50);

    for (Json card : Lists.reverse(hand)) {
      int rank = card.getInt("rank");
      CardColor c = CardColor.valueOf(card.get("color"));

      Rect r = new Rect(x, y, w, h);

      boolean showInfo = !this.myHand;
      if (onEye) {
        showInfo = false;
      }

      g.color(Color.black).fill(r);
      if (showInfo || card.has("showColor")) {
        g.color(c.getColor()).fill(r.grow(-3, -3));
      }
      if (rank > 0) {
        g.font(font).color(Color.white).text(showInfo || card.has("showRank") ? rank + "" : "?", r);
      }

      x += gap;
      x += w;
    }

    if (!this.myHand && !player.equalsIgnoreCase("board")) {
      g.draw(eye, 0, getHeight() / 2 - eye.getHeight() / 2);
    }
  }