I am working on a Java Swing project and I would like to add a "play/pause" button.
I looked for its Unicode symbol, and got its Java representation which is \u23EF
.
So I tried the following:
JButton button = new JButton("\u23EF");
The problem is that the button is blank, the character is not displayed.
In theory, Java with Swing should be able to display Unicode characters exactly like this and without the help of any conversion or anything. I did some research and haven't found any solution.
Why isn't my program behaving correctly? Is it simply a UI problem or did is my code missing something?