e838. 使JTabbedPane中的卡片能用按键的方式选取
2024-10-09 16:31:39
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 |
最新文章
- leetcode52. N-Queens II
- ios 开源代码
- 大一C语言结课设计之《学生信息管理系统》
- .NET下的延迟加载
- 201521123052《Java程序设计》第3周学习总结
- scala获取某个时间间隔的时间
- Python开发【第十篇】:模块
- Unity 让物体朝摄像机观察方向移动,已摇杆方向转向
- mysql 删除重复数据
- 游戏人工智能编程案例精粹(修订版) (Mat Buckland 著)
- Oracle的实例恢复解析
- 第八节 JS运动基础
- gulp给文件加版本号
- vue 源码阅读记录
- JQuery 对表格的详细操作
- 使用xshell5 从CentOS主机download资料
- 批量去重URL地址并剔除打不开网址
- UI---------EventSystem
- webstrom内置压缩工具YUI-compressor详解
- HDU 5696 ——区间的价值——————【线段树、快排思想】
热门文章
- 每天一个linux命令(3):du命令
- 每日英语:The Benefits of a Sleep Buddy
- Testng生成的测试报告乱码解决办法
- TextView
- 确保安全的HTTPS(使用混合加密的HTTPS,前端面试常问)第二篇
- C#学习笔记(21)——C#获取文件夹下的所有文件的文件名
- java基础篇---文件上传(commons-FileUpload组件)
- mac OS X中升级php5.5至php5.6 or php7
- Python使用4个空格替换Tab, TabError: inconsistent use of tabs and spaces in indentation。
- drupal7 的核心模块