Topic: Question about *.setStyle () in JavaFX, etc. questions about styles.
The question, actually three. But they connected. The first question. We admit at us there is something similar: import javafx.scene.control. *;//... final static String corner_style = "; final static String backgr_color ="; TextField the_txt = new TextField (); Button the_btn = new Button ("Action!" ); CheckBox the_chk = new CheckBox ();//... If to make so: the_txt. setStyle (corner_style); the_btn. setStyle (corner_style); the_chk. setStyle (corner_style);... That corners at a text box and the button become square-topped (that achieved). But here at check-boxing they do not change. The Check-boxing somehow is in another way drawn in JavaFX? ("-fx-border-radius: 0" on it too does not operate). As well as it to make "square-topped", instead of with the rounded corners? The second question. If to make so: the_txt. setStyle (backgr_color);... That "frame" round a text box generally disappears (though the background changes, as well as it is necessary). How it to save the invariable? The third question. How to make so that when TextField receives focus its background color would change on backgr_color (above), and after focus loss - it was recovered on previous on-default (anything else, except modena.css, it is not used and does not change)? Whether it is possible to make it with the help only a method setStyle () without event handlers?