JavaFX Path with lines with different stroke width


Question

I'm trying to draw a Path object with only lines, but with different stroke widths. Is that possible?

My try:

    border.setStrokeWidth(2);
    border.getElements().addAll(mTo, lTop);
    border.setStrokeWidth(5);
    border.getElements().addAll(lRight, lBottom, lLeft);

Not a success, the last stroke width is used for the whole Path.

1
2
11/16/2013 9:04:02 AM

Accepted Answer

IMO that is not possible. Use different Paths for different stroke styles. Or use javafx.​scene.​shape.Lines directly.

1
11/16/2013 1:17:12 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon