Get Java 2D Dashed Stroke - Java 2D Graphics

Java examples for 2D Graphics:Stroke

Description

Get Java 2D Dashed Stroke

Demo Code


//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;
    }
}

Related Tutorials