在SWIXML中将异常字符显示为按钮文本 [英] Displaying unusual characters as button text in SWIXML

查看:78
本文介绍了在SWIXML中将异常字符显示为按钮文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下SWIXML代码:

I have the following SWIXML code:

  <panel id="contentPanel">
    <button text="∂"/>
    <button text="∆"/>
    <button text="∏"/>
    <button text="∑"/>
  </panel>

注意用于文本的数学符号.这些符号可以在我的Java IDE中很好地呈现.但是,当我运行代码时,这些符号未在Swing组件中正确显示.它们每个看起来都像两个字符,第一个是带有变音符号的'a',第二个是一些随机字符.

Notice the mathematical symbols that are used for text. The symbols render fine in my Java IDE. However, when I run the code, the symbols are not displayed correctly in the Swing component. They each look like two characters, the first being an 'a' with diacritical marks and the second being some random character.

这是怎么回事?

推荐答案

您可以使用unicode char def例如 text="\u2211"总计

YOu can use unicode char def e.g. text="\u2211" for Sum

这篇关于在SWIXML中将异常字符显示为按钮文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆