A split pane divides its space between two components. The split pane contains a divider that allows the user to control the amount of space distributed to each component.

    // Create a left-right split pane
JSplitPane hpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftComponent, rightComponent); // Create a top-bottom split pane
JSplitPane vpane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topComponent, bottomComponent);

By default, when the divider is dragged, a shadow is displayed to indicate where the divider would be when the mouse is released. It is possible for the split pane to continuously move the divider and resize its child components while the user is dragging the divider.

    boolean b = vpane.isContinuousLayout();  // false by default

    // Set the split pane to continuously resize the child components
// which the divider is dragged
vpane.setContinuousLayout(true);

The split pane supports a one-touch-expandable capability that allows the user to conveniently move the divider to either end with a single click. This capability is enabled by setting the following property:

    b = vpane.isOneTouchExpandable();        // false by default

    vpane.setOneTouchExpandable(true);
Related Examples

e823. 创建JSplitPane的更多相关文章

  1. JSplitPane demo

    package example; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; imp ...

  2. In-Memory:在内存中创建临时表和表变量

    在Disk-Base数据库中,由于临时表和表变量的数据存储在tempdb中,如果系统频繁地创建和更新临时表和表变量,大量的IO操作集中在tempdb中,tempdb很可能成为系统性能的瓶颈.在SQL ...

  3. 创建 OVS flat network - 每天5分钟玩转 OpenStack(134)

    上一节完成了 flat 的配置工作,今天创建 OVS flat network.Admin -> Networks,点击 "Create Network" 按钮. 显示创建页 ...

  4. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第二章:利用模型类创建视图、控制器和数据库

    在这一章中,我们将直接进入项目,并且为产品和分类添加一些基本的模型类.我们将在Entity Framework的代码优先模式下,利用这些模型类创建一个数据库.我们还将学习如何在代码中创建数据库上下文类 ...

  5. ABP入门系列(2)——通过模板创建MAP版本项目

    一.从官网创建模板项目 进入官网下载模板项目 依次按下图选择: 输入验证码开始下载 下载提示: 二.启动项目 使用VS2015打开项目,还原Nuget包: 设置以Web结尾的项目,设置为启动项目: 打 ...

  6. 记一次tomcat线程创建异常调优:unable to create new native thread

    测试在进行一次性能测试的时候发现并发300个请求时出现了下面的异常: HTTP Status 500 - Handler processing failed; nested exception is ...

  7. 在WPF中使用依赖注入的方式创建视图

    在WPF中使用依赖注入的方式创建视图 0x00 问题的产生 互联网时代桌面开发真是越来越少了,很多应用都转到了浏览器端和移动智能终端,相应的软件开发上的新技术应用到桌面开发的文章也很少.我之前主要做W ...

  8. 在一个空ASP.NET Web项目上创建一个ASP.NET Web API 2.0应用

    由于ASP.NET Web API具有与ASP.NET MVC类似的编程方式,再加上目前市面上专门介绍ASP.NET Web API 的书籍少之又少(我们看到的相关内容往往是某本介绍ASP.NET M ...

  9. TODO:GitHub创建组织的步骤

    TODO:GitHub创建组织的步骤 使用GitHub进行团队合作,写这个步骤主要作用是为了OneTODO作为一个团队组织进行代码的分享,让更多人来参与. 使用帐号.密码登录GitHub 2.右上角加 ...

随机推荐

  1. 深入云存储系统Swift核心组件:Ring实现原理剖析

    http://www.cnblogs.com/yuxc/archive/2012/06/22/2558312.html 简介 OpenStack是一个美国国家航空航天局和Rackspace合作研发的开 ...

  2. C++ struct 和 Class的区别

    C++中的struct对C中的struct进行了扩充,它已经不再只是一个包含不同数据类型的数据结构了,它已经获取了太多的功能. struct能包含成员函数吗? 能!!! struct能继承吗? 能!! ...

  3. Android 编程下 Eclipse 恢复被删除的文件

    开发过程中文件误删除,又没有 Git,SVN 等版本控制软件的备份,怎么办? Eclipse 自带了恢复历史文件的功能:在项目上点击右键,选择 Restore from Local History,在 ...

  4. (转)Windows7安装OpenSSH

    (转自:http://blog.sina.com.cn/s/blog_4a0a8b5d01015b0n.html) OpenSSH很老了,所以... 最开始只是因为openSSH启动不了,才用的Mob ...

  5. 【转】解决Lost connection to MySQL server during query错误方法

    初步判断是MySQL可能挂掉了,在系统服务里面查看MySQL的进程并没有停止. 最开始考虑是数据库结构不对,但是我是通过Navicat for MySQL的备份和恢复备份导入数据,应该表结构都在备份文 ...

  6. Machine Learning、Date Mining、IR&NLP 会议期刊论文推荐

    核心期刊排名查询 http://portal.core.edu.au/conf-ranks/ http://portal.core.edu.au/jnl-ranks/ 1.机器学习推荐会议 ICML— ...

  7. 基于python3在nose测试框架的基础上添加测试数据驱动工具

    [本文出自天外归云的博客园] Python3下一些nose插件经过2to3的转换后失效了 Python的nose测试框架是通过python2编写的,通过pip3install的方式安装的nose和相关 ...

  8. Python爬网——获取安卓手机统计数据

    [本文出自天外归云的博客园] 1. 在安卓网上对热门机型进行爬网,取前五十: # -*- coding: utf-8 -*- import requests,re from bs4 import Be ...

  9. java将图片转换成二进制

    package com.oumyye.图片; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; imp ...

  10. [转]mybatis if test非空判断数字0为什么是false

    原文地址:http://blog.51cto.com/wangguangshuo/1944531 今天工作中发现一个Long类型的参数没有传到sql中去,在sql xml配置文件中是使用if test ...