在jtextarea中以换行符和间距显示文本

问题描述

| 我已经用setText函数设置了
JTextArea
的文本
abc=\"PREFIX table: <http://www.daml.org/2003/01/periodictable/PeriodicTable#> \" +
            \"SELECT ?name \" +
            \"FROM <http://www.daml.org/2003/01/periodictable/PeriodicTable.owl>\" +
            \"WHERE {\" +
            \"      ?element table:name ?name. \" +
            \"      FILTER(str(?name)=\\\"sodium\\\") \" +
            \"      }\"
texta.setText(abc);//abc is very long string
如何在
JTextArea
中显示带有换行符和间距的字符串。     

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)