draw Line - Java java.awt

Java examples for java.awt:Graphics2D

Description

draw Line

Demo Code


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

import java.awt.Graphics;

public class Main {
    public static void drawLine(Graphics offLineBuffer, Color lineColor,
            int startX, int startY, int endX, int endY) {
        offLineBuffer.setColor(lineColor);
        offLineBuffer.drawLine(startX, startY, endX, endY);
    }/*from  w w w.ja  v a  2  s  .c  o  m*/
}

Related Tutorials