draw Border - Java java.awt

Java examples for java.awt:Graphics2D

Description

draw Border

Demo Code


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

import java.awt.Graphics;

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

    public static void drawRect(Graphics offLineBuffer, Color color, int x,
            int y, int width, int height) {
        offLineBuffer.setColor(color);
        offLineBuffer.drawRect(x, y, width, height);
    }
}

Related Tutorials