gpt4 book ai didi

Java MS Word 类应用程序

转载 作者:行者123 更新时间:2023-12-01 05:57:32 25 4
gpt4 key购买 nike

您知道在 MS Word 中,您可以在任意位置编写文本并绘制​​和放置形状。在文本中,当您按 Enter 并转到新行时,光标下方的形状也会向下移动一行?我想在 Pane 上用 Java 实现该属性,使用组件作为形状和文本。如何为形状提供绝对定位,同时保留它们之间的空间?我会很感激任何想法,因为我几乎没有想法了。

最佳答案

也许你可以使用SpringLayout

Spring layouts do their job by defining directional relationships, or constraints, between the edges of components. For example, you might define that the left edge of one component is a fixed distance (5 pixels, say) from the right edge of another component.

关于Java MS Word 类应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2403250/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com