// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;

public class WhatCanIDisplay extends JFrame {
    private static final long serialVersionUID = 1L;
    public WhatCanIDisplay() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        getContentPane().setLayout(new BorderLayout());
        this.setPreferredSize(new Dimension(200, 1000));
        JTextArea res = new JTextArea();
        Font fnt = res.getFont();
        for(int i = 0; i < 65536; i++) {
            char c = (char)i;
            if(fnt.canDisplay(c)) {
                res.append(i + " = " + c + "\r\n");
            }
        }
        getContentPane().add(new JScrollPane(res), BorderLayout.CENTER);
        pack();
    }
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JFrame f = new WhatCanIDisplay();
                f.setVisible(true);
            }
        });
    }
}
