Java examples for java.awt:Graphics2D
draw Line
//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*/ }