BasicStroke.getLineWidth() has the following syntax.
public float getLineWidth()
In the following code shows how to use BasicStroke.getLineWidth() method.
import java.awt.BasicStroke; import java.util.Arrays; //from w w w . j a v a 2s . c o m 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.getLineWidth()); } }
The code above generates the following result.