If the TextField is in focus, the frame around it is highlighted in blue.
How to override the frame color to red?

    1 answer 1

    Screw css if not screwed:

     scene.getStylesheets().add( MyApplication.class.getClassLoader().getResource( "/main.css" ).toExternalForm() ); //textField.getStyleClass( "myTextFieldClass" ); //textField.setId( "myTextFieldId" ); 

    main.css:

     /* .myTextFieldClass:focused { .#myTextFieldId:focused { */ .text-field:focused { -fx-border-color:red; }