Here you can find the source of drawUp(Graphics g, int x, int y, int w, int h)
public static void drawUp(Graphics g, int x, int y, int w, int h)
//package com.java2s; //License from project: Open Source License import java.awt.Color; import java.awt.Graphics; public class Main { public static final Color SHADOW_DOWN = new Color(128, 128, 128); public static final Color SHADOW_UP = new Color(240, 240, 240); public static void drawUp(Graphics g, int x, int y, int w, int h) { g.setColor(SHADOW_UP);/* ww w. j a v a2s . c om*/ g.drawLine(x, y, x + w - 1, y); g.drawLine(x, y, x, y + h - 2); g.setColor(SHADOW_DOWN); g.drawLine(x + w - 1, y + 1, x + w - 1, y + h - 1); g.drawLine(x, y + h - 1, x + w - 1, y + h - 1); } }