Developing with the SDK > Using CSS Syntax in the Style Sheet > Customizing General Nodes in the Style Sheet > Controlling the Node's Border

The stroke (that is, the border) of the shape is controlled by the properties strokeColor, strokeWidth, strokeDashArray, strokeEndCaps, strokeLineJoins, strokeMiterLimit, and strokeDashPhase.

The strokeColor property sets the color used to paint the stroke.

The other properties are used to create an instance of java.awt.BasicStroke:

Code Sample 3.2 shows how to create a blue dashed stroke, with rounded segment ends, visible segments that have a length of 4, and transparent segments that have a length of 2, in the style sheet.

node {
   strokeColor     : "blue";
   strokeDashArray : "4,2";
   strokeEndCaps   : "CAP_ROUNDS";
}

Code Sample 3.2 Styling Rule for the Border (Stroke) of a Node

For more details of the stroke-related properties, see the documentation of the BasicStroke class in the Java documentation.