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

Menus have dark grey text on black backgrounds when high contrast is enabled

    XMLWordPrintable

    Details

      Description

      FULL PRODUCT VERSION :
      C:\WINDOWS\system32>java -version
      java version "1.8.0_144"
      Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 10 x64 Home

      Microsoft Windows [Version 10.0.15063]

      A DESCRIPTION OF THE PROBLEM :
      When high contrast is enabled in Windows 10, JavaFX menus in a menu bar have dark grey text on a black background

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Turn on high contrast in Windows, then run the included demo program. Click the "file" menu, and you can see the dark text on a black background

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      White text
      ACTUAL -
      Dark grey text

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package main;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Menu;
      import javafx.scene.control.MenuBar;
      import javafx.scene.control.MenuItem;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class Accessibility extends Application
      {
          @Override
          public void start(
              Stage primaryStage) throws Exception
          {
              final MenuItem close = new MenuItem("Close");
              final Menu file = new Menu("File");
              file.getItems().add(close);
              final MenuBar menuBar = new MenuBar(file);
              
              final VBox root = new VBox();
              root.getChildren().add(menuBar);
              
              primaryStage.setScene(new Scene(root));
              primaryStage.show();
          }
          
          public static void main(
              String[] args)
          {
              launch(args);
          }

      }

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

        Attachments

          Activity

            People

            Assignee:
            scfitch Stephen Fitch
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: