Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions test/jdk/javax/swing/JColorChooser/Test4887836.html

This file was deleted.

45 changes: 32 additions & 13 deletions test/jdk/javax/swing/JColorChooser/Test4887836.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, 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
Expand All @@ -21,23 +21,42 @@
* questions.
*/

import java.awt.Color;
import java.awt.Font;
import javax.swing.JColorChooser;
import javax.swing.UIManager;

/*
* @test
* @bug 4887836
* @summary Checks if no tooltip modification when no KeyStroke modifier
* @author Konstantin Eremin
* @run applet/manual=yesno Test4887836.html
* @library /java/awt/regtesthelpers
* @build PassFailJFrame
* @summary Checks for white area under the JColorChooser Swatch tab
* @run main/manual Test4887836
*/

import java.awt.Color;
import java.awt.Font;
import javax.swing.JApplet;
import javax.swing.JColorChooser;
import javax.swing.UIManager;
public class Test4887836 {

public static void main(String[] args) throws Exception {
String instructions = """
If you do not see white area under the \"Swatches\" tab,
then test passed, otherwise it failed.""";

PassFailJFrame.builder()
.title("Test4759306")
.instructions(instructions)
.rows(5)
.columns(40)
.testTimeOut(10)
.testUI(Test4887836::createColorChooser)
.build()
.awaitAndCheck();
}

private static JColorChooser createColorChooser() {
JColorChooser chooser = new JColorChooser(Color.LIGHT_GRAY);

public class Test4887836 extends JApplet {
public void init() {
UIManager.put("Label.font", new Font("Perpetua", 0, 36)); // NON-NLS: property and font names
add(new JColorChooser(Color.LIGHT_GRAY));
UIManager.put("Label.font", new Font("Font.DIALOG", 0, 36));
return chooser;
}
}