e824. 获得和设置JSplitPane中的子组件
// 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); // Get the children from the horizontal split pane
leftComponent = hpane.getLeftComponent();
rightComponent = hpane.getRightComponent(); // Get the children from the vertical split pane
topComponent = vpane.getTopComponent();
bottomComponent = vpane.getBottomComponent(); // Replace the children in the horizontal split pane
hpane.setLeftComponent(comp1);
hpane.setRightComponent(comp2); // Replace the children in the vertical split pane
vpane.setTopComponent(comp3);
vpane.setBottomComponent(comp4);
| Related Examples |
e824. 获得和设置JSplitPane中的子组件的更多相关文章
- vue组件之间的通信以及如何在父组件中调用子组件的方法和属性
在Vue中组件实例之间的作用域是孤立的,以为不能直接在子组件上引用父组件的数据,同时父组件也不能直接使用子组件的数据 一.父组件利用props往子组件传输数据 父组件: <div> < ...
- React Hooks中父组件中调用子组件方法
React Hooks中父组件中调用子组件方法 使用到的hooks-- useImperativeHandle,useRef /* child子组件 */ // https://reactjs.org ...
- 关于Vue中页面(父组件)下拉,页面中的子组件加载更多数据的实现方法
一个项目中存在很多这种情况:父组件(页面)中的子组件需要做下拉加载更多的需求,但是这个下拉到底部的动作只能通过监控页面(父组件)来完成 这就需要父子组件之间的通信,代码如下: 1. 建立一个用于父子组 ...
- vue 父组件中调用子组件函数
2019/06/06 在父组件中调用子组件的方法: 1.给子组件定义一个ref属性.eg:ref="childItem" 2.在子组件的methods中声明一个函数.eg: u ...
- vue父组件中获取子组件中的数据
<FormItem label="上传头像" prop="image"> <uploadImg :width="150" ...
- vue中修改子组件样式
一.问题叙述 项目里需要新添加一个表单页面,里面就只是几个select,这个几个select是原本封装好的组件,有自己原本的样式,而这次的原型图却没有和之前的样式统一起来,需要微调一下,这里就涉及到父 ...
- vue父组件中调用子组件的方法
Vue项目中如何在父组件中直接调用子组件的方法: 方案一:通过ref直接调用子组件的方法: //父组件中 <template> <div> <Button @click= ...
- vue父组件中修改子组件样式
1. 使用全局样式 <style> /* 全局样式 */ </style> <style scoped> /* 本地样式 */ </style> 2. ...
- Vue 中的 子组件 给 父组件 传值
子组件的某一个事件(sendData)内部,通过this.$emit('事件名', 传递的值)传递数据父组件在调用子组件的地方,绑定了子组件自定义的 事件名(change-data) 定义父组件的地方 ...
随机推荐
- [Windows Azure] What is Windows Azure Active Directory?
What is Windows Azure Active Directory? Windows Azure Active Directory is a service that provides id ...
- MyBatis 问题列表
问题表现:The content of elements must consist of well-formed character data or markup 解决办法:1.配置的动态SQL语句里 ...
- 关于SimpleMsgPack中swap引发的问题大端法和小端法研究笔记
今天diocp裙中[珠海]-芒果反应了一个关于SimpleMsgPack的问题 msgPack.AsFloat = 2.507182; 经过编码再解码后,会直接触发异常. 因为msgPack的标准,在 ...
- 【电子基础】液晶显示器原理·LCD驱动基础
LCD显示器概述 ——>液晶显示器,LCD为英文 Liquid Crystal Display的缩写,它是一种数字显示技术,可以通过液晶和彩色过滤光源,并在平面面板上产生图像. ——&g ...
- js 数组的增删改查
js数组元素的添加和删除一直比较迷惑,今天终于找到详细说明的资料了,先给个我测试的代码^-^ var arr = new Array(); arr[0] = "aaa"; arr[ ...
- libevent源码分析:event_add、event_del
event_add.event_del两个函数分别是使event生效和失效的,下面就来看一下两个函数的实现. event_add int event_add(struct event *ev, con ...
- hdu1598
思路:对所有路径的速度从小到大排个序,然后枚举高度差就ok...... #include<iostream> #include<cstdio> #include<cstr ...
- C# 跳转新页面
C# 跳转新页面 string url = "http://www.vipsoft.com.cn"; ResponseRedirect.Redirect(Response, url ...
- JAVA-JSP内置对象之application对象获得服务器版本
相关资料:<21天学通Java Web开发> application对象获得服务器版本1.通过application对象的getMajorVersion()方法和getMinorVersi ...
- zip伪加密
简单的话来阐述 zip伪协议的意思是说本来不需要密码的zip文件然后通过修改标志位,然后就可以达到有密码的效果对吗?但是他实际是没有密码. 一个 ZIP 文件由三个部分组成: 压缩源文件数据区+压缩源 ...