zoukankan      html  css  js  c++  java
  • e823. 创建JSplitPane

    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
  • 相关阅读:
    01、u-boot 打补丁 编译 烧写
    3、JZ2440 按键驱动(中断)
    2、JZ2440 按键驱动(查询)
    1、JZ2440 LED驱动
    004、栈的基本操作
    003、动态顺序表的插入与删除
    002、静态顺序表的插入与删除
    对百度的评价
    关于找水王的思路
    软件市场应用前景
  • 原文地址:https://www.cnblogs.com/borter/p/9596280.html
Copyright © 2011-2022 走看看