Open In App

JavaFX | VLineTo Class

VLineTo class is a part of JavaFX. VLineTo class creates a vertical line path from the current position to specified Y coordinate. VLineTo class inherits PathElement class.

Constructor of the class:



  1. VLineTo(): Creates an empty object of VLineTo.
  2. VLineTo(double y): Creates an object of VLineTo with specified value of y coordinate.

Commonly Used Methods:

Method Explanation
getY() Returns the value of Y coordinate.
setY(double v) Sets the value of Y coordinate.
toString() Returns the string representation of VLineTo object.
yProperty() Defines the Y coordinate.

Below programs illustrate the use of VLineTo Class:



Note: The above programs might not run in an online IDE please use an offline compiler.

Reference: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/shape/VLineTo.html


Article Tags :