e838. 使JTabbedPane中的卡片能用按键的方式选取
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中的卡片能用按键的方式选取的更多相关文章
- e839. 使JTabbedPane中的卡片可滚动
By default, all the tabs in a tabbed pane are displayed. When the tabs are wider than the width of t ...
- e835. 使JTabbedPane中的卡片生效和失效
By default, all new tabs are enabled, which means the user can select them. A tab can be disabled to ...
- e840. 监听JTabbedPane中选中卡片的改变
A tabbed pane fires a change event whenever the selected tab is changed either by the user or progra ...
- e832. 从JTabbedPane中移动卡片
To move a tab, it must first be removed and then reinserted into the tabbed pane as a new tab. Unfor ...
- e833. 获得JTabbedPane中的卡片
This example retrieves all the tabs in a tabbed pane: // To create a tabbed pane, see e828 创建JTabbed ...
- 1. 在config.ini文件中加入dm.park.time=1,会使uap中的tomcat启动加快
在config.ini文件中加入dm.park.time=1,会使uap中的tomcat启动加快
- 怎样使GridView中满足某个条件的行可编辑,其余行不可编辑?
DXperience是个很优秀的第三方控件包,使用起来非常方便,但有时候某些功能的实现在文档中不太容易找到解决方案,比如下面要提到的这个功能我就在文档中找了很久也没找到,最后还是在官方论坛上找到的. ...
- 【DEV GridControl】怎样使GridView中满足某个条件的行可编辑,其余行不可编辑?
DXperience控件包,使用起来非常方便,但有时候某些功能的实现在文档中不太容易找到解决方案,比如下面要提到的这个功能我就在文档中找了很久也没找到,最后还是在官方论坛上找到的. 具体问题是这样的: ...
- GridLayout 可使容器中的各个组件呈网格状布局
GridLayout 可使容器中的各个组件呈网格状布局,平局占据容器的空间,即使容器的大小发生变化,每个组件还是平均占据容器的空间. 和FlowLayout一样,GridLayout也是按照从上到下, ...
随机推荐
- Linux 服务管理两种方式service和systemctl
Linux 服务管理两种方式service和systemctl 1.service命令 service命令其实是去/etc/init.d目录下,去执行相关程序 # service命令启动redis脚本 ...
- 关于RPG游戏结构撰写的相关探索上篇
本章节的目标是创造一个游戏理念.这个理念是: *简短的项目概括 *范围描述 *目标用户 *与其他游戏的区别 不要试图编写一款缺乏明确理念的RPG.因为这样可能只会产生与其他游戏雷同的项目. <i ...
- nginx源码分析:module机制
根据nginx官方文档,添加一个module的介绍,当我们需要添加一个module时,需要以下操作: 1.为该module新建一个目录. 2.添加一个config文件,一个module核心代码源文件. ...
- Android.mk简介
http://www.cnblogs.com/hnrainll/archive/2012/12/18/2822711.html Android.mk文件是GNU Makefile的一小部分,它用来对A ...
- js实现冒泡事件,点击ul给子标签添加相同事件和阻止冒泡事件
$('#LocalLife_PopUp_layer').find('.SelectCity_Cont ul').click(function(e){ var e=e||windo ...
- java 泛型详解-绝对是对泛型方法讲解
Reference: http://blog.csdn.net/s10461/article/details/53941091 1. 概述 泛型在java中有很重要的地位,在面向对象编程及各种设计模 ...
- C盘空间不够,清除VS下的 Font Cache
C盘空间老是不够用.清除Font Cache 1.在 C:\Users\Jimmy\AppData\Local\Microsoft\Visual Studio 下的 Font Cache 目录可以干 ...
- Java Web项目部署时 “Exploded Archive”模式部署时无效
在myeclipse中部署项目时,当Deploy type为Exploded Archive(deveplopment mode)时,finish按钮为灰色,无法部署的解决方法: 1.project上 ...
- [转]快速搞懂Gson的用法
原文地址:http://coladesign.cn/fast-understand-the-usage-of-gson/ 谷歌gson这个Java类库可以把Java对象转换成JSON,也可以把JSON ...
- USB入门
简述 USB(Universal Serial Bus)全称通用串口总线,USB为解决即插即用需求而诞生,支持热插拔.USB协议版本有USB1.0.USB1.1.USB2.0.USB3.1等,USB2 ...