SearchField

SearchField extends OptionTextField and has an embedded search-button to initiate a search action. In AUTO-mode the search action starts automatically when the delay time (after the last text input change) is over.

The screenshot was taken from SearchFieldDemo - the Demo can be downloaded from the link below.

SearchField field = new SearchField("JohnDoe");
field.setPromptText("Username");
//field.setOptionButtonPosition(HPos.RIGHT);
field.setSearchMode(SearchMode.AUTO);
field.setOnAction((evt) -> System.out.println("Action"));
field.setPrefWidth(250);    
centerPane.getChildren().add(field);

See also

Download SearchField Demo
CSS Reference - SearchField