src/demo/share/jfc/SwingSet2/TreeDemo.java
changeset 57525 c8ca09de211b
parent 49495 f46bfa7a2956
--- a/src/demo/share/jfc/SwingSet2/TreeDemo.java	Thu Jul 04 12:28:34 2019 +0530
+++ b/src/demo/share/jfc/SwingSet2/TreeDemo.java	Tue Jul 16 17:00:00 2019 -0700
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -74,7 +74,7 @@
 
     public JScrollPane createTree() {
         DefaultMutableTreeNode top = new DefaultMutableTreeNode(getString("TreeDemo.music"));
-        DefaultMutableTreeNode catagory = null ;
+        DefaultMutableTreeNode category = null;
         DefaultMutableTreeNode artist = null;
         DefaultMutableTreeNode record = null;
 
@@ -94,12 +94,12 @@
                 char linetype = line.charAt(0);
                 switch(linetype) {
                    case 'C':
-                     catagory = new DefaultMutableTreeNode(line.substring(2));
-                     top.add(catagory);
+                     category = new DefaultMutableTreeNode(line.substring(2));
+                     top.add(category);
                      break;
                    case 'A':
-                     if(catagory != null) {
-                         catagory.add(artist = new DefaultMutableTreeNode(line.substring(2)));
+                     if(category != null) {
+                         category.add(artist = new DefaultMutableTreeNode(line.substring(2)));
                      }
                      break;
                    case 'R':