仅在必要时在FlowLayout中显示ScrollBars [英] Show ScrollBars in FlowLayout only when necessary

查看:137
本文介绍了仅在必要时在FlowLayout中显示ScrollBars的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将重新解释我的问题:**

I will rephrase my question:**

如果有足够的空间通过变形来显示所有项目,如何防止在FlowLayout中启用Java ScrollBar。

How to prevent Java ScrollBar from being enabled in FlowLayout when there is enough space to show all items by warping them.

**

这里是我想要实现的截图:

Here a screenshot of what I am trying to achieve:

请注意,如果没有必要,滚动条将被禁用。

Note that scrollbar is disabled when it is not necessary.

当您调整窗口大小时,如果某些项目超出了视图,则会出现滚动条

And when you resize the window scrollbar should appear if some items are out the viewplane

PS我知道称为文档和网络的东西。

P.S. I am aware of things called documentation and web.

推荐答案

您更新的屏幕截图表明您可能正在寻找包裹布局

Your updated screen shots suggest that you may be looking for Wrap Layout.

这篇关于仅在必要时在FlowLayout中显示ScrollBars的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆