Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088894

[CSS] modena.css interferes with the background color of transparent Stage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b89)
      Java HotSpot(TM) Client VM (build 25.0-b31, mixed mode, sharing)
      Windows 7 Home Edition

      JDK 8 32 bit version

      When instantiating a Label a Transparent Stage becomes opaque.
      To reproduce:
      1) Run the code below to see the correct behavior.
      2) Uncomment the statement 'new Label()' and run the code. You will see the background become white and opacity to 1.



      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.StackPane;
      import javafx.scene.shape.Rectangle;
      import javafx.stage.Stage;
      import javafx.stage.StageStyle;

      public class Main extends Application {

          @Override
          public void start(Stage primaryStage) throws Exception{

              primaryStage.initStyle(StageStyle.TRANSPARENT);
              StackPane root = new StackPane();
              Rectangle rectangle = new Rectangle(0, 0, 100, 100);
              root.getChildren().add(rectangle);
              primaryStage.setScene(new Scene(root, 300, 275, null));
              primaryStage.show();

              // uncomment line below and stage will be opacity 1
              //new Label();
          }


          public static void main(String[] args) {
              launch(args);
          }
      }

            Unassigned Unassigned
            cdea Carl Dea
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Imported: