Skip to content

Commit

Permalink
8295007: javax/swing/JRadioButton/4314194/bug4314194.java fails in ma…
Browse files Browse the repository at this point in the history
…ch5 for WIndowLookAndFeel

Reviewed-by: aivanov, tr
  • Loading branch information
prsadhuk committed Oct 10, 2022
1 parent 6ed74ef commit 269252a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ javax/swing/JPopupMenu/4870644/bug4870644.java 8194130 macosx-all,linux-all
javax/swing/dnd/8139050/NativeErrorsInTableDnD.java 8202765 macosx-all,linux-all
javax/swing/JEditorPane/6917744/bug6917744.java 8213124 macosx-all
javax/swing/plaf/aqua/CustomComboBoxFocusTest.java 8294254 macosx-all
javax/swing/JRadioButton/4314194/bug4314194.java 8295006 linux-all

# Several tests which fail on some hidpi systems/macosx12-aarch64 system
java/awt/Window/8159168/SetShapeTest.java 8274106 macosx-aarch64
Expand Down
5 changes: 3 additions & 2 deletions test/jdk/javax/swing/JRadioButton/4314194/bug4314194.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ private static boolean checkComponent(Component comp, Color c) throws Exception
totalPixels++;
}

System.out.println("correctColoredPixels " + correctColoredPixels + " totalPixels " + totalPixels);
return ((double)correctColoredPixels/totalPixels*100) >= tolerance;
}

Expand All @@ -90,8 +91,8 @@ private static void createUI() {
UIManager.getDefaults().put("CheckBox.disabledText", checkboxColor);
UIManager.getDefaults().put("RadioButton.disabledText", radioButtonColor);

checkBox = new JCheckBox("WWWWW");
radioButton = new JRadioButton("WWWWW");
checkBox = new JCheckBox("\u2588".repeat(5));
radioButton = new JRadioButton("\u2588".repeat(5));
checkBox.setFont(checkBox.getFont().deriveFont(50.0f));
radioButton.setFont(radioButton.getFont().deriveFont(50.0f));
checkBox.setEnabled(false);
Expand Down

1 comment on commit 269252a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.