8350224: Test javax/swing/JComboBox/TestComboBoxComponentRendering.java fails in ubuntu 23.x and later

Reviewed-by: aivanov, azvegint
This commit is contained in:
Prasanta Sadhukhan 2025-02-19 02:19:27 +00:00
parent 04659a4073
commit 4de92a40d0
2 changed files with 3 additions and 5 deletions

View File

@ -695,10 +695,6 @@ sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770 macosx-all
sanity/client/SwingSet/src/EditorPaneDemoTest.java 8212240 linux-x64
# jdk_swing Ubuntu 23.04 specific
javax/swing/JComboBox/TestComboBoxComponentRendering.java 8309734 linux-all
# This test fails on macOS 14
javax/swing/plaf/synth/7158712/bug7158712.java 8324782 macosx-all

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@
import java.awt.Color;
import java.awt.Component;
import java.awt.image.BufferedImage;
import java.awt.Font;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Robot;
@ -137,6 +138,7 @@ class ComboBoxCustomRenderer extends JLabel
implements ListCellRenderer {
public ComboBoxCustomRenderer() {
setFont(new Font("SansSerif", Font.BOLD, 32));
setOpaque(true);
setHorizontalAlignment(CENTER);
setVerticalAlignment(CENTER);