Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS to change the size of a TextField in javafx

I know I can do

TextField tempField = new TextField();    
tempField.setMinSize(500,500);

within JavaFX but I have about 45 text fields to change so I'd like to change them all at once by setting CSS on the scene. Can anyone help me out?

like image 435
Zach Avatar asked Dec 14 '22 14:12

Zach


1 Answers

Figured it out

.text-field{
    -fx-min-width: 50;
    -fx-min-height: 50;
}
like image 130
Zach Avatar answered Dec 22 '22 19:12

Zach