博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
swing展开所有的结点
阅读量:4298 次
发布时间:2019-05-27

本文共 687 字,大约阅读时间需要 2 分钟。

public class SwingUtil {    public static void expandTree(JTree tree) {        TreeNode root = (TreeNode) tree.getModel().getRoot();        expandTree(tree, new TreePath(root));    }    public static void expandTree(JTree tree, TreePath path) {        TreeNode node = (TreeNode) path.getLastPathComponent();        // Go to leaf        if (node.getChildCount() > 0) {            Enumeration
children = node.children(); while (children.hasMoreElements()) { TreeNode n = children.nextElement(); TreePath newPath = path.pathByAddingChild(n); expandTree(tree, newPath); } } tree.expandPath(path); }}

转载地址:http://vsnws.baihongyu.com/

你可能感兴趣的文章
海龟交易法则09_海龟式积木
查看>>
海龟交易法则10_通用积木
查看>>
海龟交易法则14_掌控心魔
查看>>
海龟交易法则15_万事俱备
查看>>
海龟交易法则16_附原版海龟交易法则
查看>>
克罗谈投资策略01_期货交易中的墨菲法则
查看>>
克罗谈投资策略02_赢家和输家
查看>>
克罗谈投资策略03_你所期望的赌博方式
查看>>
克罗谈投资策略04_感觉与现实
查看>>
通向财务自由之路01_导读
查看>>
通向财务自由之路02_成功的决定因素:你
查看>>
中低频量化交易策略研发01_引言
查看>>
中低频量化交易策略研发06_推进的择时策略
查看>>
史丹·温斯坦称傲牛熊市的秘密
查看>>
期货市场技术分析01_理论基础
查看>>
期货市场技术分析02_趋势的基本概念
查看>>
期货市场技术分析03_主要反转形态
查看>>
期货市场技术分析04_持续形态
查看>>
期货市场技术分析05_交易量和持仓兴趣
查看>>
TB交易开拓者入门教程
查看>>