title: Java tree nodes from enum values
body: <p>I populate my JTree with nodes from enum values. But the nodes display in all uppercase text. This is undesirable as I would like the nodes to display in lower case.</p>
  
  <p>example:</p>
  
  <pre><code>public enum DaysOfTheWeek {     
  
  
      MONDAY("Monday", "MON", "First day of the work week."), 
      //etc ...  
  
      private final String fullName;  
      private final String abbrvName;  
      private final String description;  
  
      DaysOfTheWeek(String fullName, String abbrvName, String description) {  
          this.fullName = fullName; 
          //etc ...  
      }  
  
      public String getFullName() {  
          return fullName;  
      }  
  }
  </code></pre>
  
  <p>I have tried:  </p>
  
  <pre><code>List&lt;DefaultMutableTreeNode&gt; daysOfWeekNodes = new ArrayList&lt;&gt;();  
  
  for(DaysOfTheWeek dotw : DaysOfTheWeek.values()) {  
  
          daysOfWeekNodes.add(new DefaultMutableTreeNode(dotw.getFullName()));  
          daysOfWeekNodes.get(dotw.ordinal()).setUserObject(dotw);  
  }
  </code></pre>
  
  <p>The node displays as: MONDAY
  But I want it to display as: Monday</p>
  
  <p>text based graphic example:</p>
  
  <pre><code>Days  
      |  
      ---Monday  
      |  
      ---Tuesday
  </code></pre>
  
  <p>not </p>
  
  <pre><code>Days  
      |  
      ---MONDAY  
      |  
      ---TUESDAY  
  </code></pre>
  
  <p>How do I get my tree node associated with the enum value, but its text on the tree to use the full name String? Or in other words, how to set a tree node user object but have its name different?</p>
  
  <p>*note - an easy fix is to go against convention and name my values how I want them displayed in the tree, not all uppercase.</p>