A tabbed pane fires a change event whenever the selected tab is changed either by the user or programmatically.

    // Create the tabbed pane
JTabbedPane pane = new JTabbedPane(); // Add tabs...; see e830 向JTabbedPane中加入一个卡片 // Register a change listener
pane.addChangeListener(new ChangeListener() {
// This method is called whenever the selected tab changes
public void stateChanged(ChangeEvent evt) {
JTabbedPane pane = (JTabbedPane)evt.getSource(); // Get current tab
int sel = pane.getSelectedIndex();
}
});
Related Examples

最新文章

  1. 基于内存,redis,mysql的高速游戏数据服务器设计架构
  2. 深入浅出设计模式——原型模式(Prototype Pattern)
  3. 报错 for input String ...
  4. Smart210学习记录-----Linux i2c驱动
  5. 腾讯云CentOS 6.6安装 Nginx
  6. 七牛CEO许式伟:移动游戏资源存贮的大趋势
  7. 为什么玩VR眼镜会头晕?
  8. K2 BPM+Microsoft Dynamics CRM,妥妥的~
  9. hdu 3308 LCIS 线段树
  10. python multiprocessing 多进程
  11. 关于cvAbs的那些事
  12. Jquery二级简单折叠菜单
  13. ADO.NET基础、数据增删改查
  14. ZOJ 3913 Bob wants to pour water
  15. hashcode的一些了解
  16. Zepto源码分析-event模块
  17. 如何开发一个chrome扩展
  18. Android Studio工程项目打包成SDK(jar或aar格式)
  19. 原生JS操作object HTMLTableSectionElement 对象,获取行数
  20. [math] sagemath

热门文章

  1. Java中使用Oracle的客户端 load data和sqlldr命令执行数据导入到数据库中
  2. js中实现对checkbox选中和取消
  3. Delphi TWebBrowser编程简述(转帖)
  4. 使用canvas制作简单表格
  5. 双重检验的单例模式,为什么要用volatile关键字
  6. java框架篇---Struts入门
  7. Android Retrofit2 网路编程
  8. poj3073
  9. ElasticSearch的安装、使用、踩坑
  10. java.io.BufferedOutputStream 源码分析