-
Bug
-
Resolution: Won't Fix
-
P3
-
8u40
-
None
-
Ubuntu 14.04.
Run the following test code:
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class TestAlert extends Application {
@Override
public void start(Stage primaryStage) {
Button btn = new Button();
btn.setText("Show Alert !!");
btn.setOnAction((ActionEvent event) -> {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.getDialogPane().setContentText("Cannot Minimise this alert :-(");
alert.show();
});
StackPane root = new StackPane();
root.getChildren().add(btn);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello Alert!");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
1) Click on the button. It will open an Alert. When you click on the minimize button of the Alert it will minimize but after that the Alert automatically maximizes by itself. Hence the Alert cannot be kept minimised.
2) But after showing the Alert if you minimize the primaryStage and then try to minimize the Alert, it will stay minimised. So no issues there.
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class TestAlert extends Application {
@Override
public void start(Stage primaryStage) {
Button btn = new Button();
btn.setText("Show Alert !!");
btn.setOnAction((ActionEvent event) -> {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.getDialogPane().setContentText("Cannot Minimise this alert :-(");
alert.show();
});
StackPane root = new StackPane();
root.getChildren().add(btn);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello Alert!");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
1) Click on the button. It will open an Alert. When you click on the minimize button of the Alert it will minimize but after that the Alert automatically maximizes by itself. Hence the Alert cannot be kept minimised.
2) But after showing the Alert if you minimize the primaryStage and then try to minimize the Alert, it will stay minimised. So no issues there.
- relates to
-
JDK-8089970 [Dialog,Gtk] Alert intermittently reopens when closed with 'X' on Linux
-
- Open
-
-
JDK-8094625 Glass/GTK should support removing Window.MINIMIZABLE, Window.MAXIMIZABLE
-
- Resolved
-
-
JDK-8095347 Owned and Modal Windows should not be minimizable/maximizable
-
- Resolved
-