From 40a334105841fc2f6e175291e9e7bcfe56f3437c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 18 Jan 2019 11:29:40 +0100 Subject: [PATCH] Code cleanup. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/RegionView.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/RegionView.java b/src/RegionView.java index 3c79ea6..d44cd04 100644 --- a/src/RegionView.java +++ b/src/RegionView.java @@ -57,18 +57,14 @@ public class RegionView extends JPanel { public static DefaultMutableTreeNode sortTree(DefaultMutableTreeNode root) { { for (int i = 0; i < root.getChildCount() - 1; i++) { - DefaultMutableTreeNode node = (DefaultMutableTreeNode) root - .getChildAt(i); + DefaultMutableTreeNode node = (DefaultMutableTreeNode) root.getChildAt(i); String nt = node.getUserObject().toString(); for (int j = i + 1; j <= root.getChildCount() - 1; j++) { DefaultMutableTreeNode prevNode = (DefaultMutableTreeNode) root .getChildAt(j); String np = prevNode.getUserObject().toString(); - - System.out.println(nt + " " + np); if (nt.compareToIgnoreCase(np) > 0) { - root.insert(node, j); break; } @@ -77,7 +73,6 @@ public class RegionView extends JPanel { node = sortTree(node); } } - return root; } } -- 2.34.1