e830. 向JTabbedPane中加入一个卡片
This example demonstrates various ways to add a tab to a tabbed pane.
// Create a tabbed pane
JTabbedPane pane = new JTabbedPane(); // Add a tab with a label taken from the name of the component
component1.setName("Tab Label");
pane.add(component1); // Add a tab with a label at the end of all tabs
String label = "Tab Label";
pane.addTab(label, component2); // Add a tab with a label and icon at the end of all tabs
Icon icon = new ImageIcon("icon.gif");
pane.addTab(label, icon, component3); // Add a tab with a label, icon, and tool tip at the end of all tabs
String tooltip = "Tool Tip Text";
pane.addTab(label, icon, component4, tooltip); // Insert a tab after the first tab
int index = 1;
pane.insertTab(label, icon, component5, tooltip, index);
Related Examples |
e830. 向JTabbedPane中加入一个卡片的更多相关文章
- e831. 从JTabbedPane中删除一个卡片
// To create a tabbed pane, see e828 创建JTabbedPane // Remove the last tab pane.remove(pane.getTabCou ...
- e839. 使JTabbedPane中的卡片可滚动
By default, all the tabs in a tabbed pane are displayed. When the tabs are wider than the width of t ...
- e840. 监听JTabbedPane中选中卡片的改变
A tabbed pane fires a change event whenever the selected tab is changed either by the user or progra ...
- Ionic 2 中创建一个照片倾斜浏览组件
内容简介 今天介绍一个新的UI元素,就是当我们改变设备的方向时,我们可以看到照片的不同部分,有一种身临其境的感觉,类似于360全景视图在移动设备上的应用. 倾斜照片浏览 Ionic 2 实例开发 新增 ...
- 在iOS中实现一个简单的画板App
在这个随笔中,我们要为iPhone实现一个简单的画板App. 首先需要指出的是,这个demo中使用QuarzCore进行绘画,而不是OpenGL.这两个都可以实现类似的功能,区别是OpenGL更快,但 ...
- 如何在ASP.NET Core中实现一个基础的身份认证
注:本文提到的代码示例下载地址> How to achieve a basic authorization in ASP.NET Core 如何在ASP.NET Core中实现一个基础的身份认证 ...
- 在ASP.NET Core中实现一个Token base的身份认证
注:本文提到的代码示例下载地址> How to achieve a bearer token authentication and authorization in ASP.NET Core 在 ...
- Step by step 活动目录中添加一个子域
原创地址:http://www.cnblogs.com/jfzhu/p/4006545.html 转载请注明出处 前面介绍过如何创建一个域,下面再介绍一下如何在该父域中添加一个子域. 活动目录中的森林 ...
- [转]如何在ASP.NET Core中实现一个基础的身份认证
本文转自:http://www.cnblogs.com/onecodeonescript/p/6015512.html 注:本文提到的代码示例下载地址> How to achieve a bas ...
随机推荐
- 不忘初心,回归本质 .net core
static void Main(string[] args) { ; object j = i;//装箱 就是把值类型转换成引用类型 int k = (int)j;//拆箱 就是把引用类型转换成值类 ...
- 每日英语:America The Vulgar
'What's celebrity sex, Dad?' It was my 7-year-old son, who had been looking over my shoulder at my c ...
- 【转】(四)unity4.6Ugui中文教程文档-------概要-UGUI Visual Components
原创至上,移步请戳:(四)unity4.6Ugui中文教程文档-------概要-UGUI Visual Components 3.Visual Components 有新的组件和游戏对象已添加到uG ...
- 【Mysql】linux连接mysql错误解决方案
1.源码 //connect-mysql.c #include <stdio.h> #include "/usr/include/mysql/mysql.h" int ...
- VMware的快照和克隆总结
原文:https://www.cnblogs.com/zxz1987/p/6480833.html 多重快照功能简介: 快照的含义:对某一个特定文件系统在某一个特定时间内的一个具有只读属性的镜像.当 ...
- 【Ubuntu】服务器状态命令
序号 命令名称 命令 1 查看Ubuntu版本 cat /etc/issue2 查看物理CPU个数 cat /proc/cpuinfo| grep "physical id"| s ...
- 基于jQuery经典扫雷游戏源码
分享一款基于jQuery经典扫雷游戏源码.这是一款网页版扫雷小游戏特效代码下载.效果图如下: 在线预览 源码下载 实现的代码. html代码: <center> <h1>j ...
- js上传文件带参数,并且,返回给前台文件路径,解析上传的xml文件,存储到数据库中
ajaxfileupload.js jQuery.extend({ createUploadIframe: function(id, uri) { //create frame var frameId ...
- mac上校验文件的 md5 sha-1
文件校验 mac md5 sha-1html, body {overflow-x: initial !important;}.CodeMirror { height: auto; } .CodeMir ...
- Centos6.5生成环境配置--nginx1.9 + PHP+可多个tomcat(多个端口)+多域名+java web 负载均衡
安装n p 参考: CentOS6.5搭建LNMP http://www.cnblogs.com/xiaoit/p/3991037.html http://blog.csdn.net/keyunq/a ...