Here you can find the source of drawDisabledBorder(Graphics g, int x, int y, int w, int h)
static void drawDisabledBorder(Graphics g, int x, int y, int w, int h)
//package com.java2s; //License from project: Open Source License import java.awt.Graphics; import javax.swing.plaf.metal.MetalLookAndFeel; public class Main { static void drawDisabledBorder(Graphics g, int x, int y, int w, int h) { g.translate(x, y);/* ww w . j a va 2s .co m*/ g.setColor(MetalLookAndFeel.getControlShadow()); g.drawRect(0, 0, w - 1, h - 1); g.translate(-x, -y); } }