[英]Horizontal Scrolling in Swing
I am having some problems figuring out how to make the outlined red part in the screenshot below using Swing. 我在弄清楚如何使用Swing在下面的屏幕截图中制作红色轮廓部分时遇到一些问题。 It's a GUI issue. 这是一个GUI问题。 Specifically I'm doing a little project about TV Series and I don't know how to show the characters' name in a horizontal scrolling control. 具体来说,我正在做一个关于电视连续剧的小项目,我不知道如何在水平滚动控件中显示角色名称。
Can anyone show me the extends JTabbedPane
about my particular problem? 有人可以向我展示有关我的特定问题的扩展JTabbedPane
吗?
If I'm missing something please let me know. 如果我缺少什么,请告诉我。
Full screenshot: http://img138.imageshack.us/img138/5381/screenxk.png 完整屏幕截图: http : //img138.imageshack.us/img138/5381/screenxk.png
You may be looking for JTabbedPane.SCROLL_TAB_LAYOUT
, which provides platform-specific navigation controls: 您可能正在寻找JTabbedPane.SCROLL_TAB_LAYOUT
,它提供了特定于平台的导航控件:
If all the tabs do not fit within a single run the look and feel will provide a way to navigate to hidden tabs. 如果所有选项卡都不适合一次运行,则外观将提供导航至隐藏选项卡的方式。
In contrast JTabbedPane.WRAP_TAB_LAYOUT
provides a (default) wrapping policy: 相反, JTabbedPane.WRAP_TAB_LAYOUT
提供了(默认)包装策略:
The tab layout policy for wrapping tabs in multiple runs when all tabs will not fit within a single run. 当所有选项卡都不能在一次运行中容纳时,用于将选项卡包装在多个运行中的选项卡布局策略。
See How to Use Tabbed Panes for examples . 有关示例,请参见如何使用选项卡式窗格 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.