[OpenJDK 2D-Dev] what changed to make NSImage://NSListViewTemplate render correctly in JDK 17?

Alan Snyder javalists at cbfiddle.com
Thu May 27 15:07:56 UTC 2021


I notice that NSImage://NSListViewTemplate renders correctly in JDK 17 but not in previous JDKs, at least those that I have tried.
In the older JDKs, it renders as lines, whereas in JDK 17 it renders as dots and lines (as it does in Finder).
I tested on a recent iMac with Retina display using macOS 11.3.1.

I tried to find a JDK source change that would explain this improvement, but without success.
Anyone know?
Could it be an SDK linkage issue?

  Alan


package test;

import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.*;

public class TestNSListViewTemplate
    extends JFrame
{
    public TestNSListViewTemplate()
    {
        Image im = Toolkit.getDefaultToolkit().getImage("NSImage://NSListViewTemplate");
        ImageIcon icon = new ImageIcon(im);
        JLabel label = new JLabel(icon);
        setContentPane(label);
        setSize(800, 800);
        setVisible(true);
    }

    public static void main(String[] args)
    {
        SwingUtilities.invokeLater(TestNSListViewTemplate::new);
    }
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/2d-dev/attachments/20210527/f2acf3b7/attachment.htm>


More information about the 2d-dev mailing list