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

JavaFX screen is not drawn correctly on Windows (Japanese) high contrast

    XMLWordPrintable

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Microsoft Windows [Version 10.0.19044.1566]
      java.runtime.version: 17.0.2+8-86
      javafx.runtime.version: 17.0.2-ea+3


      A DESCRIPTION OF THE PROBLEM :
      JavaFX screen is not drawn correctly on Windows (Japanese) high contrast.
      I am checking with a combination of a small program and command arguments.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      -- batch ---

      PATH C:\java\jdk-17.0.2\bin;%PATH%
      cd /d C:\java\bell-jfx\a
      set arg=-cp bin --module-path "c:\java\javafx-sdk-17.0.2\lib" --add-modules javafx.controls,javafx.fxml
      set yob=-Dcom.sun.javafx.highContrastTheme=YellowOnBlack
      java %arg% a.T NonE
      java %arg% %yob% a.T YOB
      java %arg% -Duser.language=en a.T EN
      java %arg% -Duser.language=ja a.T JA
      java %arg% %yob% -Duser.language=en a.T EN+YOB
      java %arg% %yob% -Duser.language=ja a.T JA+YOB


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Incorrect color, font size, checkbox size
      ACTUAL -
      I want it to be displayed correctly without specifying system parameters.

      ---------- BEGIN SOURCE ----------
      package a;
      import java.util.*;
      import javafx.application.*;
      import javafx.scene.*;
      import javafx.scene.control.*;
      import javafx.scene.layout.*;
      import javafx.scene.text.*;
      import javafx.stage.*;
      public class T extends Application {
      @Override public void start(final Stage stage) {
      VBox body = new VBox();
      Scene scene = new Scene(body);
      stage.setScene(scene);
      stage.setWidth(200);
      stage.setHeight(250);
      Font font = Font.font("", FontWeight.NORMAL, 20);
      CheckBox check;
      for(int n=0; n<5; n++) {
      body.getChildren().add(check = new CheckBox("あいう"));
      check.setFont(font);
      }
      stage.setTitle(String.join(" ", getParameters().getRaw()));
      stage.show();
      }
      public static void main(String[] args) {
      //System.setProperty("com.sun.javafx.highContrastTheme", "WHITEONBLACK");
      //Locale.setDefault(Locale.ENGLISH);
      System.out.println("java.runtime.version: " + System.getProperty("java.runtime.version"));
      System.out.println("javafx.runtime.version: " + System.getProperty("javafx.runtime.version"));
      launch(args);
      }
      }

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

      FREQUENCY : always


        Attachments

        1. 1.png
          1.png
          7 kB
        2. 2.png
          2.png
          5 kB
        3. 3.png
          3.png
          6 kB
        4. 4.png
          4.png
          6 kB
        5. 5.png
          5.png
          11 kB
        6. 6.png
          6.png
          6 kB
        7. T.java
          1.0 kB

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: