fill Rectangle - Java 2D Graphics

Java examples for 2D Graphics:Rectangle

Description

fill Rectangle

Demo Code


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

import java.awt.Graphics;

public class Main {
    public static void fillRect(Graphics offLineBuffer, Color color, int x,
            int y, int width, int height) {
        offLineBuffer.setColor(color);/* w  w w .j a v a 2  s  . com*/
        offLineBuffer.fillRect(x, y, width, height);
    }
}

Related Tutorials