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. C++11 POD类型

    POD,全称plain old data,plain代表它是一个普通类型,old代表它可以与c兼容,可以使用比如memcpy()这类c中最原始函数进行操作.C++11中把POD分为了两个基本概念的集合 ...

  2. vue-cli+webpack在生成的项目中使用bootstrap方法(一)

    在一个html页面中加入bootstrap是很方便,就是一般的将css和js文件通过Link和Script标签就行. 那么在一个用vue-vli生成的前端项目中如何加入?因为框架不一样了,略微要适应一 ...

  3. (转)go语言nsq源码解读二 nsqlookupd、nsqd与nsqadmin

    转自:http://www.baiyuxiong.com/?p=886 ---------------------------------------------------------------- ...

  4. IntelliJ IDEA中的properties文件乱码转成中文[unicode码转中文]

    在IntelliJ IDEA中,一些.properties后缀的配置文件中的中文常常会是下面的样子,看不懂怎么办? 解决办法:File-->Settings-->File Encoding ...

  5. js获取系统的根路径实现介绍

    js如何获取系统的根路径,在本文给出了详细的方法 function getBasePath(){ var obj=window.location; var contextPath=obj.pathna ...

  6. Linux各个文件夹的作用~~~非常实用!!

    linux下的文件结构,看看每个文件夹都是干吗用的/bin   二进制可执行命令 /dev 设备特殊文件 /etc 系统管理和配置文件 /etc/rc.d 启动的配置文件和脚本 /home 用户主目录 ...

  7. myeclipse上传git的问题

    unstaged changes 建好仓库,连接到git之后,在上传代码的时候发现有一些代码是unstaged changes状态.这样的文件是没法上传到git上去的.解决方法是给这些文件增加inde ...

  8. android之滑屏的实现

    ★理论知识 ●View在屏幕上显示出来要先经过measure(计算)和layout(布局).  ◆当控件的父元素正要放置该控件时调用,父元素会问子控件“你想要用多大的地方?”,然后传入两个参数widt ...

  9. 轻量级Modal模态框插件cta.js

    今天给大家分享一款轻量级Modal模态框插件cta.js.这是一款无需使用jQuery插件,纯js编写的模态框弹出特效.效果图如下: 在线预览   源码下载 实现的代码. html代码: <se ...

  10. 猥琐百度杯猥琐CTF

    其实不难,但是作为我这个代码菜鸡+脑洞菜鸡+黑阔菜鸡而言确实挺难. 题目源码: <?php error_reporting(0); session_start(); require('./fla ...