简单来说,我找不到一种方法可以在JLabel中轻松显示假名.
作为记录:
Furigana (振り仮名?) is a Japanese reading
aid, consisting of smaller kana, or
syllabic characters, printed next to a
kanji (ideographic character) or other
character to indicate its
pronunciation. In horizontal text,
yokogaki, they are placed above the
line of text, while in vertical text,
tategaki, they are placed to the right
of the line of text, as illustrated
below. It is one type of ruby text.
Furigana are also known as yomigana
(読み仮名?) or rubi (ルビ?) in Japanese.
在XHTML中,这支持Ruby Annotation元素,而这反过来又不受Swing有限的HTML呈现功能的支持.
我最近尝试通过在JPanel中堆叠多个JLabel元素来创建一个能够处理Ruby Annotation元素的JRubyLabel类 – 但是,我对Swing不太熟悉,所以在某种意义上我觉得我已经过了 – 使事情变得复杂.
因此,我的问题按优先顺序排列:
> Swing是否支持显示ruby文本?
>你能看到在Swing中实现ruby文本的更简单或更好的方法吗?
>最后,还有其他GUI程序 – 最好是Java – 支持ruby文本吗?
最佳答案
Itadaki Source Forge项目支持Java Swing中的Furigana.