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

    // 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; // Determine whether the tab is enabled
boolean enabled = pane.isEnabledAt(index); // Disable the tab
pane.setEnabledAt(index, false);
Related Examples

e835. 使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. e838. 使JTabbedPane中的卡片能用按键的方式选取

    Setting a mnemonic on a tab allows the tab to be selected with a keystroke. For example, if the mnem ...

  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. MVC项目中ExecutionTimeout不生效的解决方案

    我们做web服务器端开发时,经常会遇到一个需求场景,因为某些耗时处理造成页面的响应处理时间超长,技术角度就想能否给页面处理程序一个指定的超时时间,服务端处理程序执行时间超过这个指定的超时时间则中断处理 ...

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

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

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

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

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

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

随机推荐

  1. artificial%20intelligence%20a%20modern%20approach

    http://stpk.cs.rtu.lv/sites/all/files/stpk/materiali/mi/artificial%20intelligence%20a%20modern%20app ...

  2. pandas数组(pandas Series)-(4)NaN的处理

    上一篇pandas数组(pandas Series)-(3)向量化运算里说到,将两个 pandas Series 进行向量化运算的时候,如果某个 key 索引只在其中一个 Series 里出现,计算的 ...

  3. [开源项目-MyBean轻量级配置框架] 使用MyBean快速搭建分模块的应用程序(主页面的TAB)(DLL-MDI)

    [概述] 抱歉由于上次开源比较匆忙,没有来的及做一个DEMO,里面也有些垃圾的文件没有及时清理.DEMO其实昨天晚上已经调通.相关说明文档今天晚上才说明好,欢迎大家继续关注和交流,和大家一起分享我10 ...

  4. Improving Performance【转】

    This section provides solutions to some performance problems, and describes configuration best pract ...

  5. C#数组 添加元素

    例1: string[] a = new string[] { "1", "2", "3" }; 给a追加一个 "4" ...

  6. UnicodeDecodeError: 'ascii' codec can't decode byte 0xa3 in position 1: ordinal not in range(128)

    使用codecs模块 codecs模块能在处理字节流的时候提供很大帮助.你可以用定义的编码来打开文件并且你从文件里读取的内容会被自动转化为Unicode对象. 试试这个: >>> i ...

  7. git 常用命令以及解决问题方法

    1. 创建分支: git branch test 2.切换分支: git checkout test 或切换为主分支 git checkout master 3.查看当前分支 git branch - ...

  8. eclipse Maven 使用记录 ------ 建立 webapp项目

    maven 建立 webapp 项目 有2种方式 ,  1.在原先app上转换为webapp项目  2.建立maven项目的时候  filter 选择webapp 该选项把webapp文件目录建好,其 ...

  9. ubuntu 安装 sublime

    1.安装包下载 http://www.sublimetext.com/ 2.解压并移动到/usr/lib/下 tar -xvf Sublime.tar.bz2 mv Sublime /usr/lib/ ...

  10. javascript 完美解决对联广告

    javascript 完美解决对联广告 // function couplet(){ if(arguments.length>=1) this.objID = document.getEleme ...