Line wrap in a JTextArea causes JScrollPane to missbehave with MiGLayout

前端 未结 4 2015
轻奢々
轻奢々 2021-02-10 01:58

I am having trouble with the same thing as this guy:

MigLayout JTextArea is not shrinking when used with linewrap=true

and I used the solution described in one o

4条回答
  •  醉话见心
    2021-02-10 02:44

    I had a very similar problem and following the answer in the mentioned question did not help me either. However, it did provide a valuable idea -- the problem is in the width of the JTextArea with wrap enabled.

    What worked for me was setting both minimum and preferred width at the component level using command width. For example, width 10:500:.

提交回复
热议问题