If a value has been selected in the DatePicker and the FileChooser has been shown, then the App hangs if you close the window (FileChooser is visible again).
import java.time.LocalDate;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.DatePicker;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
public class Test extends Application {
@Override
public void start(Stage stage) throws Exception {
DatePicker datePicker = new DatePicker(LocalDate.now());
stage.setScene(new Scene(new VBox(datePicker), 300, 200));
stage.show();
datePicker.setOnAction(e -> {
// Is fired on Stage closing if it was fired by DatePicker once
// -> VM crash
new FileChooser().showOpenDialog(stage);
});
}
public static void main(String[] args) {
launch(args);
}
}
import java.time.LocalDate;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.DatePicker;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
public class Test extends Application {
@Override
public void start(Stage stage) throws Exception {
DatePicker datePicker = new DatePicker(LocalDate.now());
stage.setScene(new Scene(new VBox(datePicker), 300, 200));
stage.show();
datePicker.setOnAction(e -> {
// Is fired on Stage closing if it was fired by DatePicker once
// -> VM crash
new FileChooser().showOpenDialog(stage);
});
}
public static void main(String[] args) {
launch(args);
}
}
- blocks
-
JDK-8098096 [Quantum] Cleanup renderLock usage to call QuantumToolkit runWith/WithoutRenderLock
-
- Resolved
-
- relates to
-
JDK-8097293 [DatePicker] Does not change to new selected value if modal window is shown in DatePicker-action
-
- Resolved
-