Here you can find the source of drawPressed3DBorder(Graphics g, int x, int y, int w, int h)
static void drawPressed3DBorder(Graphics g, int x, int y, int w, int h)
//package com.java2s; import java.awt.Graphics; import javax.swing.UIManager; public class Main { static void drawPressed3DBorder(Graphics g, int x, int y, int w, int h) { g.translate(x, y);// ww w . j a v a2s. com g.setColor(UIManager.getColor("controlShadow")); g.drawLine(0, 0, w - 2, 0); g.drawLine(0, 0, 0, h - 2); g.setColor(UIManager.getColor("controlLtHighlight")); g.drawLine(w - 1, 0, w - 1, h - 1); g.drawLine(0, h - 1, w - 1, h - 1); g.translate(-x, -y); } }