Java examples for 2D Graphics:Rectangle
fill Bevel Foggy Rect
//package com.java2s; import java.awt.Graphics; public class Main { public static void fillBevelFoggyRect(Graphics g, int x, int y, int width, int height) { for (int i = x; i < width + x; i++) { for (int j = y + i % 3; j < height + y; j += 3) { g.fillRect(i, j, 1, 1);/* w ww . jav a 2 s. c o m*/ } } } }