In the test below the min height of ColorPicker is different to other controls. By resizing the window the height of the ColorPicker varies. This behavior is different to CombBox and DatePicker.
public class DatePickerTest extends Application
{
public static void main(String[] args)
{
Application.launch(args);
}
@Override
public void start(Stage stage)
{
System.err.println(System.getProperty("javafx.runtime.version"));
VBox vbox = new VBox(10);
ComboBox<?> combo = new ComboBox<>();
vbox.getChildren().add(combo);
DatePicker datePicker = new DatePicker();
vbox.getChildren().add(datePicker);
ColorPicker colorPicker = new ColorPicker();
//workaround
//colorPicker.setMinHeight(Region.USE_PREF_SIZE);
vbox.getChildren().add(colorPicker);
Scene scene = new Scene(vbox);
stage.setScene(scene);
stage.show();
System.err.println(combo.getPrefHeight() + " " + combo.getMinHeight());
System.err.println(datePicker.getPrefHeight() + " " + datePicker.getMinHeight());
System.err.println(colorPicker.getPrefHeight() + " " + colorPicker.getMinHeight());
}
}
public class DatePickerTest extends Application
{
public static void main(String[] args)
{
Application.launch(args);
}
@Override
public void start(Stage stage)
{
System.err.println(System.getProperty("javafx.runtime.version"));
VBox vbox = new VBox(10);
ComboBox<?> combo = new ComboBox<>();
vbox.getChildren().add(combo);
DatePicker datePicker = new DatePicker();
vbox.getChildren().add(datePicker);
ColorPicker colorPicker = new ColorPicker();
//workaround
//colorPicker.setMinHeight(Region.USE_PREF_SIZE);
vbox.getChildren().add(colorPicker);
Scene scene = new Scene(vbox);
stage.setScene(scene);
stage.show();
System.err.println(combo.getPrefHeight() + " " + combo.getMinHeight());
System.err.println(datePicker.getPrefHeight() + " " + datePicker.getMinHeight());
System.err.println(colorPicker.getPrefHeight() + " " + colorPicker.getMinHeight());
}
}