e828. 创建JTabbedPane
A tabbed pane is a container that displays only one child component at a time. Typically, the children are themselves containers of other components. Each child is associated with a visible tab on the tabbed pane. The user can choose a child to display by selecting the tab associated with that child.
// Create a child container which is to be associated with a tab
JPanel panel = new JPanel();
// Add components to the panel... // Specify on which edge the tabs should appear
int location = JTabbedPane.TOP; // or BOTTOM, LEFT, RIGHT // Create the tabbed pane
JTabbedPane pane = new JTabbedPane(); // Add a tab
String label = "Tab Label";
pane.addTab(label, panel);
| Related Examples |
e828. 创建JTabbedPane的更多相关文章
- e831. 从JTabbedPane中删除一个卡片
// To create a tabbed pane, see e828 创建JTabbedPane // Remove the last tab pane.remove(pane.getTabCou ...
- e829. 获得和设置JTabbedPane 的卡片
// To create a tabbed pane, see e828 创建JTabbedPane // Get the index of the currently selected tab in ...
- e832. 从JTabbedPane中移动卡片
To move a tab, it must first be removed and then reinserted into the tabbed pane as a new tab. Unfor ...
- e833. 获得JTabbedPane中的卡片
This example retrieves all the tabs in a tabbed pane: // To create a tabbed pane, see e828 创建JTabbed ...
- JAVA-基础(十) Swing
在看到applet和Swing的时候,我想起了winform,以及java beans包中各种所谓的组件的时候,一切都那么似曾相识. Swing是AWT的扩展,它提供了更强大和更灵活的组件集合. 除了 ...
- menu JPopupMenu JTabbedPane
菜单是GUI中最常用的组件,菜单不是Component类的子类,不能放置在普通容器中,不受布局管理器的约束,只能放置在菜单栏中. 菜单组件由菜单栏 (MenuBar).菜单(Menu)和菜单项(Men ...
- In-Memory:在内存中创建临时表和表变量
在Disk-Base数据库中,由于临时表和表变量的数据存储在tempdb中,如果系统频繁地创建和更新临时表和表变量,大量的IO操作集中在tempdb中,tempdb很可能成为系统性能的瓶颈.在SQL ...
- 创建 OVS flat network - 每天5分钟玩转 OpenStack(134)
上一节完成了 flat 的配置工作,今天创建 OVS flat network.Admin -> Networks,点击 "Create Network" 按钮. 显示创建页 ...
- ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第二章:利用模型类创建视图、控制器和数据库
在这一章中,我们将直接进入项目,并且为产品和分类添加一些基本的模型类.我们将在Entity Framework的代码优先模式下,利用这些模型类创建一个数据库.我们还将学习如何在代码中创建数据库上下文类 ...
随机推荐
- Redis高可用架构—Keepalive+VIP
最近整理一下Redis高可用架构的文档,也准备分享出来,虽然这些架构也不是很复杂.Redis的高可用方案目前主要尝试过5种方式,其中2种方式已经在线上使用. 1)Redis Master-Slave ...
- 6 Multi-Cloud Architecture Designs for an Effective Cloud
https://www.simform.com/multi-cloud-architecture/ Enterprises increasingly want to take advantage of ...
- Mac下使用su命令提示sorry
Mac下使用su命令提示sorry,解决办法如下: ➜ Downloads su Password: su: Sorry 谷歌之,两个解决方式: sudo su - # 输入开始第一个创建用户的密码 ...
- Python爬取爱奇艺【老子传奇】评论数据
# -*- coding: utf-8 -*- import requests import os import csv import time import random base_url = 'h ...
- JS实现获取当前URL和来源URL的方法
通用模式: Javascript 正常取来源网页的URL只要用: index.html: <!DOCTYPE html> <html lang="zh-cn"&g ...
- java面向对象(1)
一.方法传不固定值的用法 public void Test(int a,Person ...Persons) { for(Person p:Persons){ ...
- [转]使用Navicat导入导出数据库表
原文地址:https://blog.csdn.net/anselandevil/article/details/81667199 步骤1:数据中原始数据如下: 点击表,右键选择导出向导,选择导出为sq ...
- Java中的sun.misc.Unsafe包
chronicle项目:https://github.com/peter-lawrey/Java-Chronicle 这个项目是利用mmap机制来实现高效的读写数据,号称每秒写入5到20百万条数据. ...
- Java通过ssh连接到Linxu和Windos服务器远程启动Tomcat
一.Linxu服务器远程启动tomcat 1.首先确保linxu服务器上的tomcat jdk等必要软件正确安装,并且可以正常启动. 2.编写Java SSH工具类. 相关jar包: <depe ...
- flume中HdfsSink参数说明
flume到hdfsSink: type hdfs path 写入hdfs的路径,需要包含文件系统标识,比如:hdfs://namenode/flume/webdata/ 可以使用flume提供的日期 ...