draw Rect - Java 2D Graphics

Java examples for 2D Graphics:Rectangle

Description

draw Rect

Demo Code


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

import java.awt.Graphics;

public class Main {
    public static void drawRect(Graphics offLineBuffer, Color color, int x,
            int y, int width, int height) {
        offLineBuffer.setColor(color);//from  w  ww  .  java 2s  .  c om
        offLineBuffer.drawRect(x, y, width, height);
    }
}

Related Tutorials