Here you can find the source of drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
public static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight)
//package com.java2s; //License from project: Open Source License import java.awt.Color; import java.awt.Graphics; public class Main { public static void drawGroove(Graphics g, int x, int y, int w, int h, Color shadow, Color highlight) { Color oldColor = g.getColor(); // Make no net change to g g.translate(x, y);/*from ww w . j av a2 s.c om*/ g.setColor(shadow); g.drawRect(0, 0, w - 2, h - 2); g.setColor(highlight); g.drawLine(1, h - 3, 1, 1); g.drawLine(1, 1, w - 3, 1); g.drawLine(0, h - 1, w - 1, h - 1); g.drawLine(w - 1, h - 1, w - 1, 0); g.translate(-x, -y); g.setColor(oldColor); } }