[英]Is it possible to set width of the JTextPane?
我有一個可調整大小的JFrame
。 我在JScrollbar
JTextPane
添加到了它。
現在,我想修復JTextPane
的寬度,以便在添加新文本時(如果它長於JTextPane
寬度)包裹文本! 我的JTextPane
有一個StyledDocument
。
將JTextPane
添加到JScrollPane
。 當達到文本窗格的寬度時,文本將自動換行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.