-
Bug
-
Resolution: Fixed
-
P3
-
8
-
Macbook Air 2012, OS X 10.9, JavaFX 8b132 (8 initial release version).
If I attempt to show two transparent stages, initially only the last stage which I show is shown.
Once I close the last stage, the first stage is then shown.
But both stages should be shown at the same time.
Sample code:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
// should show (simultaneously) two transparent stages. Click on a stage to close it.
public class DualTransparentStagesBug extends Application {
@Override
public void start(Stage stage1) {
StackPane layout = createLayout("1");
stage1.initStyle(StageStyle.TRANSPARENT);
stage1.setScene(new Scene(layout, 100, 100, null));
stage1.getScene().setOnMouseClicked(e -> stage1.hide());
stage1.setX(200);
stage1.setY(200);
stage1.show();
Stage stage2 = new Stage();
stage2.initStyle(StageStyle.TRANSPARENT);
stage2.setScene(new Scene(createLayout("2"), 100, 100, null));
stage2.getScene().setOnMouseClicked(e -> stage2.hide());
stage2.setX(350);
stage2.setY(200);
stage2.show();
}
private StackPane createLayout(String text) {
StackPane layout = new StackPane(new Label(text));
layout.setStyle("-fx-background-color: rgba(255, 255, 255, 0.3); -fx-font-size: 60;");
return layout;
}
public static void main(String[] args) {
launch(args);
}
}
Once I close the last stage, the first stage is then shown.
But both stages should be shown at the same time.
Sample code:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
// should show (simultaneously) two transparent stages. Click on a stage to close it.
public class DualTransparentStagesBug extends Application {
@Override
public void start(Stage stage1) {
StackPane layout = createLayout("1");
stage1.initStyle(StageStyle.TRANSPARENT);
stage1.setScene(new Scene(layout, 100, 100, null));
stage1.getScene().setOnMouseClicked(e -> stage1.hide());
stage1.setX(200);
stage1.setY(200);
stage1.show();
Stage stage2 = new Stage();
stage2.initStyle(StageStyle.TRANSPARENT);
stage2.setScene(new Scene(createLayout("2"), 100, 100, null));
stage2.getScene().setOnMouseClicked(e -> stage2.hide());
stage2.setX(350);
stage2.setY(200);
stage2.show();
}
private StackPane createLayout(String text) {
StackPane layout = new StackPane(new Label(text));
layout.setStyle("-fx-background-color: rgba(255, 255, 255, 0.3); -fx-font-size: 60;");
return layout;
}
public static void main(String[] args) {
launch(args);
}
}
- relates to
-
JDK-8123430 Mac: System menu bar doesn't work at all with MacOS 10.9
- Resolved