Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Swing - JButton and Unicode

807606Feb 5 2007 — edited Feb 5 2007
Hi,
sorry if this is too easy. I want to label my JButtons with Unicode code points and am having trouble doing it. The code is something like this

JButton button = new JButton();

button.setFont(new Font("Arial Unicode MS", Font.PLAIN, 11));
button.setText("\u0654");


The corresponding unicode symbol doesnt display, however. The Arial Unicode MS font is definitely on the system...Any ideas where i'm going wrong?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2007
Added on Feb 5 2007
15 comments
3,175 views