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

最新文章

  1. leetcode52. N-Queens II
  2. ios 开源代码
  3. 大一C语言结课设计之《学生信息管理系统》
  4. .NET下的延迟加载
  5. 201521123052《Java程序设计》第3周学习总结
  6. scala获取某个时间间隔的时间
  7. Python开发【第十篇】:模块
  8. Unity 让物体朝摄像机观察方向移动,已摇杆方向转向
  9. mysql 删除重复数据
  10. 游戏人工智能编程案例精粹(修订版) (Mat Buckland 著)
  11. Oracle的实例恢复解析
  12. 第八节 JS运动基础
  13. gulp给文件加版本号
  14. vue 源码阅读记录
  15. JQuery 对表格的详细操作
  16. 使用xshell5 从CentOS主机download资料
  17. 批量去重URL地址并剔除打不开网址
  18. UI---------EventSystem
  19. webstrom内置压缩工具YUI-compressor详解
  20. HDU 5696 ——区间的价值——————【线段树、快排思想】

热门文章

  1. 每天一个linux命令(3):du命令
  2. 每日英语:The Benefits of a Sleep Buddy
  3. Testng生成的测试报告乱码解决办法
  4. TextView
  5. 确保安全的HTTPS(使用混合加密的HTTPS,前端面试常问)第二篇
  6. C#学习笔记(21)——C#获取文件夹下的所有文件的文件名
  7. java基础篇---文件上传(commons-FileUpload组件)
  8. mac OS X中升级php5.5至php5.6 or php7
  9. Python使用4个空格替换Tab, TabError: inconsistent use of tabs and spaces in indentation。
  10. drupal7 的核心模块