vaadin的Java秋千流

发布于 2025-01-27 06:58:37 字数 240 浏览 4 评论 0原文

你们中有些人可能知道,在Java Swing Framework中,有一个称为Flowlayout的布局。为了使事情变得有点,我开始使用vaadin而不是摇摆。一切正常,除了我没有找到经典摇摆Flowlayout的简单替代方案。

我想将组件彼此放置,直到填充一行的水平空间,并且布局开始将组件放在新行中。我尝试使用水平布局,但是它没有创建新行,而是使其组件较小。

有什么想法吗?

As some of you might know there is a Layout that is called FlowLayout in the Java Swing Framework. To spice things up a little I started using Vaadin instead of Swing. Everything works fine except that I haven't found an easy alternative to the classic Swing FlowLayout.

I want to place Components next to each other until the horizontal space of a row is filled and the layout starts placing components in a new row. I tried using the Horizontal Layout, but instead of creating a new row, it makes its components smaller.

Any Ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冰之心 2025-02-03 06:58:37

您可以使用
a

You can use
a FlexLayout
with
wrapping.
The default direction (column) and a wrap will give you the behaviour, that items
added to the layout will use the space they need (make sure to
"un-specifiy" where needed) and once the horizontal screen space is used up, break into the next line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文