From 8833f95adeb3e88365ef9f687da04f3c993352d6 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 5 Dec 2018 10:00:58 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-13194=20=E5=A4=84=E7=90=86=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java b/designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java index 769ff4a60..f205cca92 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java @@ -100,10 +100,9 @@ public class CheckBoxTreeCellRenderer extends NullPanel implements TreeCellRende Border border = treeCellRendererComponent.getBorder(); setBorder(border); treeCellRendererComponent.setBorder(BorderFactory.createEmptyBorder()); - //todo 可能会发生数组越界,需要处理一下 - if (getComponentCount() == 2) { - remove(1); - } + + remove((Component) this._actualTreeRenderer); + add(treeCellRendererComponent); }