SmPanelShrinkable

SmPanelShrinkable 是可收起、可展开的Panel,其接口说明可参见 SmPanelShrinkable 接口说明文档。

示范代码

SmPanelShrinkable 控件使用的示例代码如下:

this.checkBox =new JCheckBox("是否只读");
this.button = new JButton("关闭数据源");
JPanel jPanel = new JPanel();
jPanel.add(this.button);
jPanel.add(this.checkBox);
//初始化可收缩面板,传入标题、展示的控件及间隔
this.smPanelShrinkable = new SmPanelShrinkable("用于展开的控件",jPanel,15,0,0,0);
//设置为展开
this.smPanelShrinkable.setExpand();
//设置为收起
this.smPanelShrinkable.setCollapse();

SmPanelShrinkable 控件显示效果如下: