Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在java中使用miglayout。我想知道如果该文本超过容器的宽度,我如何在 jlabel 中制作一个很长的文本跨越多行?请帮忙。我不能使用 html 它使绘画变慢
尝试这样的事情:
JPanel jpanel = new JPanel(new MigLayout("insets 0 0 0 0", "[fill, 99%]", "[grow]"));
我在我的代码中发现了这个,它工作正常。我认为“[grow]”负责完成这项工作。