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