Java examples for 2D Graphics:Stroke
Get Java 2D Dashed Stroke
//package com.java2s; import java.awt.*; public class Main { public static void main(String[] argv) throws Exception { System.out.println(GetDashedStroke()); }//from ww w . j a va2 s . c om private final static Stroke _dashedStroke = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, new float[] { 10.0f }, 0.0f); public static Stroke GetDashedStroke() { return _dashedStroke; } }