Here you can find the source of paintCross(Graphics g, Color color, int centerX, int centerY, int size, int width)
public static void paintCross(Graphics g, Color color, int centerX, int centerY, int size, int width)
//package com.java2s; //License from project: Open Source License import java.awt.Color; import java.awt.Graphics; public class Main { public static void paintCross(Graphics g, Color color, int centerX, int centerY, int size, int width) /* */{//from w w w .jav a 2 s.co m /* 257 */g.setColor(color); /* 258 */size /= 2; /* 259 */for (int i = 0; i < width; i++) { /* 260 */g.drawLine(centerX - size, centerY - size, centerX + size, centerY + size); /* 261 */g.drawLine(centerX + size, centerY - size, centerX - size, centerY + size); /* 262 */centerX++; /* */} /* */} }