
- JavaFX Tutorial
- JavaFX - Home
- JavaFX - Overview
- JavaFX - Environment
- JavaFX - Architecture
- JavaFX - Application
- JavaFX - 2D Shapes
- JavaFX - Text
- JavaFX - Effects
- JavaFX - Transformations
- JavaFX - Animations
- JavaFX - Colors
- JavaFX - Images
- JavaFX - 3D Shapes
- JavaFX - Event Handling
- JavaFX - UI Controls
- JavaFX - Charts
- JavaFX - Layout Panes
- JavaFX - CSS
- JavaFX Useful Resources
- JavaFX - Quick Guide
- JavaFX - Useful Resources
- JavaFX - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
2D Objects Properties - Stroke Line Cap
This property is of the type StrokeLineCap It represents the end cap style of the line. You can set the line cap stroke using the method setStrokeLineCap() as shown in the following code block −
line.setStrokeLineCap(StrokeLineCap.SQUARE);
The stroke line cap can be −
Butt − The butt line cap is applied at the end of the lines (StrokeLineCap.BUTT).
Square − The square line cap is applied at the end of the lines (StrokeLineCap.SQUARE).
Round − The round line cap is applied at the end of the lines (StrokeLineCap.ROUND).
By default, the Stroke Line cap a shape is square. Following is the diagram of a triangle with different line cap types.

javafx_2d_shapes.htm
Advertisements