Java Swing Tutorial - Java BasicStroke.getEndCap()








Example

In the following code shows how to use BasicStroke.getEndCap() method.

//from  w  w  w  .  j  av a 2 s .  c om
import java.awt.BasicStroke;
import java.util.Arrays;

public class Main {
  public static void main(String[] args) {
    BasicStroke stroke = new BasicStroke(10, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0.1F);
    System.out.println(stroke.getEndCap());

  }
}

The code above generates the following result.