0

テキストを複数行に表示し、テキストを右揃えにしたい。

JTextAreaTで入れてみたのComponentOrientation.RIGHT_TO_LEFですが句読点(?!)が正しく表示されません。

ここに画像の説明を入力

4

2 に答える 2

1

JTextArea で html を使用しないのはなぜですか。Java はそれを正しく表示します。例:

JLabel example = new JLabel();
example.setText("<html>This is the first line<br>This is the second</html>");
于 2015-12-07T17:06:00.637 に答える