fill Thwart Foggy Rect - Java 2D Graphics

Java examples for 2D Graphics:Rectangle

Description

fill Thwart Foggy Rect

Demo Code


//package com.java2s;
import java.awt.Graphics;

public class Main {
    public static void fillThwartFoggyRect(Graphics g, int x, int y,
            int width, int height) {
        for (int i = x; i < width + x; i += 2) {
            for (int j = y; j < height + y; j += 2) {
                g.fillRect(i, j, 1, 1);//from   ww w .j  a  va  2s  .c  om
            }
        }
    }
}

Related Tutorials