【发布时间】:2015-08-10 15:38:03
【问题描述】:
我在更改警报按钮的大小时遇到问题。
Alert alert = new Alert(alertType);
alert.setTitle(titulo);
alert.setHeaderText(encabezado);
alert.setContentText(mensaje);
ButtonType button1 = new ButtonType(mensajeBoton1);
ButtonType button2 = new ButtonType(mensajeBoton2);
alert.getButtonTypes().setAll(button1, button2);
Optional<ButtonType> result = alert.showAndWait();
if (result.get() == button1) {
return Dialog.Actions.OK;
}
问题是因为buttonType很小,而且是在触摸屏上使用的。
【问题讨论】: