Setting a mnemonic on a tab allows the tab to be selected with a keystroke. For example, if the mnemonic for a tab were the key L, then typing ALT-L (on Windows) would select the tab.

    // Create a tabbed pane
JTabbedPane pane = new JTabbedPane(); // Add a tab
pane.addTab("Tab Label", component); // Get index of the new tab
int index = pane.getTabCount()-1; // Set the mnemonic; on some look and feels, the L in the label will be underlined
int keycode = KeyEvent.VK_L;
pane.setMnemonicAt(index, keycode);
Related Examples

e838. 使JTabbedPane中的卡片能用按键的方式选取的更多相关文章

  1. e839. 使JTabbedPane中的卡片可滚动

    By default, all the tabs in a tabbed pane are displayed. When the tabs are wider than the width of t ...

  2. e835. 使JTabbedPane中的卡片生效和失效

    By default, all new tabs are enabled, which means the user can select them. A tab can be disabled to ...

  3. e840. 监听JTabbedPane中选中卡片的改变

    A tabbed pane fires a change event whenever the selected tab is changed either by the user or progra ...

  4. e832. 从JTabbedPane中移动卡片

    To move a tab, it must first be removed and then reinserted into the tabbed pane as a new tab. Unfor ...

  5. e833. 获得JTabbedPane中的卡片

    This example retrieves all the tabs in a tabbed pane: // To create a tabbed pane, see e828 创建JTabbed ...

  6. 1. 在config.ini文件中加入dm.park.time=1,会使uap中的tomcat启动加快

    在config.ini文件中加入dm.park.time=1,会使uap中的tomcat启动加快

  7. 怎样使GridView中满足某个条件的行可编辑,其余行不可编辑?

    DXperience是个很优秀的第三方控件包,使用起来非常方便,但有时候某些功能的实现在文档中不太容易找到解决方案,比如下面要提到的这个功能我就在文档中找了很久也没找到,最后还是在官方论坛上找到的. ...

  8. 【DEV GridControl】怎样使GridView中满足某个条件的行可编辑,其余行不可编辑?

    DXperience控件包,使用起来非常方便,但有时候某些功能的实现在文档中不太容易找到解决方案,比如下面要提到的这个功能我就在文档中找了很久也没找到,最后还是在官方论坛上找到的. 具体问题是这样的: ...

  9. GridLayout 可使容器中的各个组件呈网格状布局

    GridLayout 可使容器中的各个组件呈网格状布局,平局占据容器的空间,即使容器的大小发生变化,每个组件还是平均占据容器的空间. 和FlowLayout一样,GridLayout也是按照从上到下, ...

随机推荐

  1. AI 技术咖们说,进入未来世界首先需要一个“虚拟的我” | 科技生活节倒计时8天

    http://www.tmtpost.com/3367762.html 未来世界是什么样子? 斯皮尔伯格在<头号玩家>中构建了一个充满科技感.富有浓烈浪漫主义色彩的虚拟世界.戴上VR眼镜, ...

  2. angular的uiRouter服务学习(3)

    本篇接着上一篇 angular的uiRouter服务学习(2) 继续讲解uiRouter的用法 本篇主要讲解uiRouter的多个命名的视图 我们可以给ui-view元素添加ui-view的值来给它命 ...

  3. Lua应用——tables应用,查找是否为保留字

    Lua中的table功能确实强大.因为table是Lua中的唯一数据结构.今天有点晕,少说两句多拷贝代码吧. 实例: 假定你想列出在一段源代码中出现的所有标示符,某种程度上,你需要过滤掉那些语言本身的 ...

  4. ubuntu+nginx+laravel

    1, 到http://v4.golaravel.com/docs/4.2/installation 点击下载最新版Laravel框架.然后解压 2,把laravel-master下的文件夹拷入到php ...

  5. nexus maven私服搭建

    1.在服务器上安装jdk 2.下载 nexus-3.14.0-04-unix.tar.gz,并上传到服务器/opt目录 3.解压 tar -zxvf nexus-3.14.0-04-unix.tar. ...

  6. User-Defined-Literal自定义字面量

    c++支持多种内置类型的字面量,比如: 123u // unsigned int 1.0 // double 1.6f // float 'a' // char 4ULL // unsigned lo ...

  7. MSTP故障处理手册

    H3C核心交换机常见故障定位手册.pdf MSTP故障处理手册.pdf 目 录 1 MSTP故障处理 1.1 广播风暴故障处理 1.1.1 故障描述 1.1.2 故障处理流程 1.1.3 故障处理步骤 ...

  8. C# 去除json字符串key引号

    采用正则表达式去除: 方法 /// <summary> /// 去除json key双引号 /// </summary> /// <param name="js ...

  9. idea 设置字体

    1.设置 ui字体 修改编辑器的字体(也就是代码的字体):设置-Editor-Color&Font,默认的scheme是不可以更改的,你需要save as,建立一个新的(名字可以随意写个,My ...

  10. Logistic回归分析简介

    Logistic回归:实际上属于判别分析,因拥有很差的判别效率而不常用. 1. 应用范围: ①     适用于流行病学资料的危险因素分析 ②     实验室中药物的剂量-反应关系 ③     临床试验 ...