Color saved = g.getColor(); Point x; Point y; Point z; Polygon lines;  g.setColor(thumbHighlightColor); x = new Point(thumbBounds.x + 1, thumbBounds.y + 1); y = new Point(x); y.translate(thumbBounds.width - 2, 0); z = new Point(x); z.translate(0, thumbBounds.height - 2);  lines = new Polygon(new int[] { x.x, y.x, z.x }, new int[] { x.y, y.y, z.y }, 3);  g.drawPolygon(lines);  g.setColor(thumbLightShadowColor); x = new Point(thumbBounds.x + thumbBounds.width - 1, thumbBounds.y + thumbBounds.height - 1); y = new Point(x); y.translate(-(thumbBounds.width - 2), 0); z = new Point(x); z.translate(0, -(thumbBounds.height - 2));  lines = new Polygon(new int[] { x.x, y.x, z.x }, new int[] { x.y, y.y, z.y }, 3); g.drawPolygon(lines);  g.setColor(thumbDarkShadowColor); x = new Point(thumbBounds.x + thumbBounds.width, thumbBounds.y + thumbBounds.height); y = new Point(x); y.translate(-thumbBounds.width, 0); z = new Point(x); z.translate(0, -thumbBounds.height);  lines = new Polygon(new int[] { x.x, y.x, z.x }, new int[] { x.y, y.y, z.y }, 3); g.drawPolygon(lines);
  protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)  {    Color saved = g.getColor();    Point x;    Point y;    Point z;    Polygon lines;    g.setColor(thumbHighlightColor);    x = new Point(thumbBounds.x + 1, thumbBounds.y + 1);    y = new Point(x);    y.translate(thumbBounds.width - 2, 0);    z = new Point(x);    z.translate(0, thumbBounds.height - 2);    lines = new Polygon(new int[] { x.x, y.x, z.x },                        new int[] { x.y, y.y, z.y }, 3);    g.drawPolygon(lines);    g.setColor(thumbLightShadowColor);    x = new Point(thumbBounds.x + thumbBounds.width - 1,                  thumbBounds.y + thumbBounds.height - 1);    y = new Point(x);    y.translate(-(thumbBounds.width - 2), 0);    z = new Point(x);    z.translate(0, -(thumbBounds.height - 2));    lines = new Polygon(new int[] { x.x, y.x, z.x },                        new int[] { x.y, y.y, z.y }, 3);    g.drawPolygon(lines);    g.setColor(thumbDarkShadowColor);    x = new Point(thumbBounds.x + thumbBounds.width,                  thumbBounds.y + thumbBounds.height);    y = new Point(x);    y.translate(-thumbBounds.width, 0);    z = new Point(x);    z.translate(0, -thumbBounds.height);    lines = new Polygon(new int[] { x.x, y.x, z.x },                        new int[] { x.y, y.y, z.y }, 3);    g.drawPolygon(lines);    g.setColor(thumbColor);    g.fillRect(thumbBounds.x, thumbBounds.y, thumbBounds.width,               thumbBounds.height);    g.setColor(saved);  }