import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class TextFieldPromptTest extends Application { 

	@Override 
	public void start(Stage primaryStage) throws Exception{ 
		Stage stage = new Stage(); 
		final TextField a = new TextField(); 
		a.setPromptText("This is a prompt text"); 
		a.setStyle("-fx-prompt-text-fill: red;"); 
		VBox box = new VBox(0); 
		box.setMinWidth(0); 
		box.setFillWidth(false); 
		box.getChildren().addAll(a, new TextField()); 
		Scene scene = new Scene(box, 200, 200);
		//scene.getStylesheets().add(this.getClass().getResource("style.css").toExternalForm());
		stage.setScene(scene); 
		stage.show(); 
	} 


	public static void main(String[] args) { 
		launch(args); 
	} 
} 