e837. 设置JTabbedPane中卡片的颜色
// Create a tabbed pane
JTabbedPane pane = new JTabbedPane(); // Set the text color for all tabs
pane.setForeground(Color.YELLOW); // Set the background color for all tabs
pane.setBackground(Color.MAGENTA); // Add a tab
String label = "Tab Label";
pane.addTab(label, component); // Get index of the new tab
int index = pane.getTabCount()-1; // Set text color for the new tab
pane.setForegroundAt(index, Color.ORANGE); // Set background color for the new tab
pane.setBackgroundAt(index, Color.GREEN);
| Related Examples |
e837. 设置JTabbedPane中卡片的颜色的更多相关文章
- e836. 设置JTabbedPane中卡片的提示语
There are two ways to set a tool tip on a tab. The first is to specify it when the tab is created; t ...
- e834. 设置JTabbedPane中卡片的位置
The tabs of a tabbed pane can be placed on one of the four edges of its container. By default, when ...
- QT5如何设置QLabel中字体的颜色
修改了wd的文章: 如何使用Qt5,设置QLabel中字体的颜色. 大致有几种做法: 一是使用setPalette()方法: 二是使用样式表: 三是可以使用QStyle: 四是可以在其中使用一些简单的 ...
- 用cv::Scalar来设置opencv中图片的颜色
1 怎样使用cv::Scalar来设置opencv中的颜色 cv::Scalar的构造函数是cv::Scalar(v1, v2, v3, v4),前面的三个参数是依次设置BGR的,和RGB相反,第四个 ...
- 我的python中级班学习之路(全程笔记第一模块) (第一章)(第2部分:如何设置python中的字体颜色,猜年龄练习题解答,while else语句,pycharm的使用)
第一章: python 基础语法 第 2 部分: 一.猜年龄练习题解答 直接上代码 >>> age = 26 >>> count = 0 >>&g ...
- 设置IDEA中各种线条颜色
在IDEA之中, 如同TearLine, 行号, 搜索结果高亮, Caret Line, 方法分隔线颜色的设置的操作方法如下: 操作路径: 1.Ctrl+Alt+S, 打开设置: settings ...
- e829. 获得和设置JTabbedPane 的卡片
// To create a tabbed pane, see e828 创建JTabbedPane // Get the index of the currently selected tab in ...
- css设置input中placeholder字体
设置input中placeholder字体颜色 input::-webkit-input-placeholder {color:@a;} input:-moz-placeholder {color:@ ...
- tabBar中tabBarItem选中颜色自定义设置
1.在storyBoard中,选中tabBarController,设置tabBar中KeyPath中的(selectedImageTintColor)如图 2. 直接代码设置 tabBarContr ...
随机推荐
- adb devices连接提示 Android offline或unauthorized的解决办法
我有一个华为X1手机,版本是Android 4.2.2(我的手机是Android 4.0版本), 但之前用adb连接(包括usb/tcp)时总莫名其妙出现offline或unauthorized的问题 ...
- 因默认包扫描问题导致的SpringBoot项目无法启动问题
启动SpringBoot项目的时候,提示如下信息: -- :: --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing or ...
- 如何使cmd窗口正确显示utf-8编码的文字
http://blog.csdn.net/ehcoing/article/details/51865922 ********************************************** ...
- Python3之pymysql导入mysql
$cat insert.py #!/usr/bin/python # -*- coding: UTF-8 -*- import os import sys import datetime import ...
- 【CNN】卷积神经网络
什么是卷积神经网络 卷积神经网络是一种特殊的.简化的深层神经网络模型,它的每个卷积层都是由多个卷积滤波器组成.它最先由lecun在LeNet[40]中提出,网络结构如下图所示.在cnn中,图像的一小部 ...
- Liunx下Intel无线网卡驱动安装
原文: https://blog.csdn.net/u014157776/article/details/78272611 首先查看网卡型号,指令: lspci | grep -i net 如果是In ...
- C#学习笔记(25)——用刻盘器批量从U盘删除添加文件
说明(2017-11-17 14:46:05): 1. 因为经常要从U盘里面删除版本,然后添加版本,每次都要几个人手动复制粘贴,费时费力,就花了一下午时间写了个程序,自动删除和添加版本. 2. Dri ...
- 基于jQuery仿去哪儿城市选择代码
基于jQuery仿去哪儿城市选择代码.这是一款使用的jQuery城市选择特效代码下载.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div class="lin ...
- Android Retrofit2 数据解析
在弄数据解析这块,浪费了很长的时间,最开始一直觉得传过来用对象接收的,类型是json,往那个方式去想了.搞了很久. 后来看了别人写的才发觉,真是很简单,感谢 https://www.jianshu.c ...
- Sphinx/Coreseek 4.1的安装流程
yum install mysql-devel libxml2-devel expat-devel cd /data/software/ wget http://www.coreseek.cn/upl ...