void () { final DetectedFrameworkTreeNodeBase[] nodes = myTree.getSelectedNodes(DetectedFrameworkTreeNodeBase.class, null); if (nodes.length == 1) { final DetectedFrameworkTreeNodeBase node = nodes[0]; String description = node.isChecked() ? node.getCheckedDescription() : node.getUncheckedDescription(); if (description != null) { ((CardLayout)myOptionsPanel.getLayout()).show(myOptionsPanel, "description"); myDescriptionLabel.setText(UIUtil.toHtml(description)); return; } } ((CardLayout)myOptionsPanel.getLayout()).show(myOptionsPanel, "empty"); }