Unicode Character uncompatibility?
问题 I have a problem with character encoding using swing on Java. I want to write this character: "\u2699" That is a gear on a simple JButton but when I start my program I get only a JButton with a square and not the gear. This is the line: opt.setText("\u2699"); Where opt is the button. The button result: Can I change swing character encoding or something else? Thanks. 回答1: As mentioned by Andreas, use a Font that supports that character. But unless supplying a suitable font for the app., the