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);
    }
}

Reply via email to