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

Wrong Graphic color of RadioMenuItem

    XMLWordPrintable

Details

    • x86_64
    • windows_10

    Description

      ADDITIONAL SYSTEM INFORMATION :
      java version "12.0.1" 2019-04-16
      Java(TM) SE Runtime Environment (build 12.0.1+12)
      Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

      Windows 10

      A DESCRIPTION OF THE PROBLEM :
      I use a Label as a graphic of a RadioMenu Item.
      The color of the text is wrong after several open of the menu

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Execute the attached sample app
      Click on the menu > it should open label aa
      Click elsewhere > it should close the menu
      Re-Click on the menu => Label is displayed white !!
      Hover with mouse on aaa the label is here !!!

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The label should always be display black and white on hove
      ACTUAL -
      The label is white on white

      ---------- BEGIN SOURCE ----------
      /*
       * To change this license header, choose License Headers in Project Properties.
       * To change this template file, choose Tools | Templates
       * and open the template in the editor.
       */

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.Menu;
      import javafx.scene.control.MenuBar;
      import javafx.scene.control.RadioMenuItem;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;

      /**
       *
       * @author Cyril F <cyril.f>
       */
      public class BugLabelLadder extends Application {

          @Override
          public void start(Stage primaryStage) {
              RadioMenuItem radioMenuItem = new RadioMenuItem("aaa", new Label("label"));
              Menu menu = new Menu("menu");
              menu.getItems().add(radioMenuItem);
              MenuBar menuBar = new MenuBar(menu);

              StackPane root = new StackPane();
              root.getChildren().add(menuBar);

              Scene scene = new Scene(root, 300, 250);

              primaryStage.setTitle("BugLabelLadder");
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          /**
           * @param args the command line arguments
           */
          public static void main(String[] args) {
              launch(args);
          }

      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      No Workaround

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              arapte Ambarish Rapte
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: