【发布时间】:2017-09-01 21:37:49
【问题描述】:
我在使用 html 在 Eclipse UI 文本字段中设置换行符时遇到问题 这是我所拥有的:
tfCharacterDescription.setText(
"<html><div style='text-align: center;'>This is a human. <br>"
+ "The Humans has been good Warriors for centuries <br>"
+ "but they just cant get the hang of using a <br>"
+ "bow the right way.</html>"
);
我不确定这是否是这样做的,但我似乎找不到任何其他说明。
【问题讨论】:
-
尝试
<br />而不是<br>。或者尝试用段落分隔行。