当我使用JTextPane并在HTML模式中键入一些文本时
JTextPane textPane = new JTextPane();
textPane.setContentType("text/html");
//...
textPane.setText(textPane.getText());删除行首的空格。为什么?
发布于 2014-10-19 19:59:55
尝试使用 在文本/html内容类型的开头添加空格。此链接描述了如何在html:http://webdesign.about.com/od/beginningtutorials/qt/spaces-in-html.htm中添加空格的方法,您可以使用其中之一。
https://stackoverflow.com/questions/26453521
复制相似问题