import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import javafx.stage.Stage;

public class GlyphSpacing extends Application 
{ 
	public void start(final Stage primaryStage) throws Exception 
	{ 
		Button singleNode = new Button("SingleNode"); 
		Button multiNode = new Button("MultiNode"); 
		TextFlow textFlow = new TextFlow(new Text(" .GlyphSpacing")); 
		VBox root = new VBox(new HBox(singleNode, multiNode), textFlow); 

		singleNode.setOnAction(e -> 
		{ 
			textFlow.getChildren().clear(); 
			textFlow.getChildren().add(new Text(" .GlyphSpacing")); 
		}); 

		multiNode.setOnAction(e -> 
		{ 
			textFlow.getChildren().clear(); 
			textFlow.getChildren() 
			.addAll(new Text(" ."), new Text("GlyphSpacing")); 
		}); 

		Scene scene = new Scene(root, 200, 200); 

		primaryStage.setScene(scene); 
		primaryStage.show(); 
	} 
	public static void main(String[] args) {
		launch(args);
		
	}
} 