In javaFX, we can create a text node by using its package javafx.scene.text. Example
Text text = new Text();