开发者

It is possible to make just some tabs focusable (JTabbedPane)?

It is possible to make just some 开发者_开发知识库tabs focusable, for instance the first 3 of 5 tabs? So that when changing tabs with the left - right keys, the non-focusable ones to be skipped (to be displayed only by mouse clicks).

Thanks!


All Swing components use Actions to handle key events. So you can replace the existing action with a custom Action of your own.

Check out Key Bindings to see the Actions that are defined for a tabbed pane.

You may also find Wrapping Actions and Table Tabbing helpful as they show how you can reuse existing Actions when customizing behaviour.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜