Problem: I have java code that i would like to display a Unicode character like the following capture image. I succeed to display in System.out.println
but in java swing I could not display the character.
Question: How can I display the Unicode character in JTextPane so I can see the emotions?
Code:
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JTextPane textPane = new JTextPane();
System.out.println(String.valueOf("\u2622"));
textPane.setContentType("text/html");
textPane.setText("c'est " + String.valueOf("\u2622"));
frame.getContentPane().add(textPane, BorderLayout.CENTER);
}