e824. 获得和设置JSplitPane中的子组件
2024-08-24 18:15:37
// 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 |
最新文章
- DOM对象与JQUERY对象的相互转化
- (转)SpyGlass工具介绍
- bzoj3315:[Usaco2013 Nov]Pogo-Cow
- Spring事务传播特性的浅析——事务方法嵌套调用的迷茫
- [RAC] oracle rac 后台进程
- 不为人知的Locked
- React的JSX语法及组件
- Filebeat 启动关闭流程
- 【朝花夕拾】Android编码风格篇
- cdh5.15集群添加spark2.3服务(parcels安装)
- Django之Models(一)
- React native 环境搭建遇到问题解决(android)
- Sqlite数据库管理(SQLite Developer) v4.0.0.528 中文版+破解方法(申明:来源于网络)
- shiro实战系列(八)之安全管理器
- 【Pyton】【小甲鱼】正则表达式(一)
- CF&;&;CC百套计划1 Codeforces Round #449 B. Ithea Plays With Chtholly
- NLTK和Stanford NLP两个工具的安装配置
- golang学习之slice基本操作
- CentOS/RedHat安装Python3
- BZOJ2333:[SCOI2011]棘手的操作(Splay)