Index: trunk/src/tmcsim/client/cadclientgui/screens/Login.java
===================================================================
--- trunk/src/tmcsim/client/cadclientgui/screens/Login.java	(revision 532)
+++ trunk/src/tmcsim/client/cadclientgui/screens/Login.java	(revision 639)
@@ -53,5 +53,5 @@
     public Login(String studentNamesFile)
     {
-        readNamesFile(studentNamesFile);
+        students = readNamesFile(studentNamesFile);
         initView();
     }
@@ -62,8 +62,10 @@
      * with the names of participants in that training. 
      * @param studentNamesFile the full path to a text file of student names
-     * @author jdalbey  ticket #206
+     * @author jdalbey  ticket #206, #254
      */
-    private void readNamesFile(String studentNamesFile)
-    {
+    public static Vector<String> readNamesFile(String studentNamesFile)
+    {
+        // Initialize the student name list
+        Vector<String> lines = new Vector<String>();
         FileInputStream fis = null;
         try {
@@ -75,20 +77,21 @@
             // split string into an array
             String[] results = out.split("\\n");
-            // Initialize the student name list
-            students = new Vector();
-            // Make sure to truncate names before putting in list
+            // Put the names into a list (so it can be displayed in comboBox)
             for (String name: results)
             {
-                String truncName = name.trim();
-                // Limit name length so it fits in the combo box
-                if (truncName.length() > 26)
+                // Make sure to reverse name order before putting in list
+                String displayName = name.trim();
+                // Ignore blank lines
+                if (displayName.length() > 0)
                 {
-                    truncName = truncName.substring(0,25);
+                    // Limit name length so it fits in the combo box
+                    if (displayName.length() > 26)
+                    {
+                        displayName = displayName.substring(0,25);
+                    }
+                    // Add the validated name to the list of students
+                    lines.add(displayName);
                 }
-                // Add the validated name to the list of students
-                students.add(truncName);
             }
-            // Append the default name 
-            students.add("Anonymous Trainee");
         } catch (FileNotFoundException ex) {
             Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
@@ -100,5 +103,24 @@
             }
         }
-    }
+        return lines;
+    }
+    
+    /** Reverse order of lastname, firstname to firstname lastname 
+     * @param formattedname fullname with lastname first, separated by comma
+     * @return fullname with firstname first and no comma
+     *  Note, the result is what is desired for the CAD comment log entries.
+     *  If formattedname lacks a comma, just return it unchanged.
+     */
+    public static String reverseLastFirst(String formattedname)
+    {
+        int commapos = formattedname.indexOf(",");
+        // Handle input name without comma - just return it
+        if (commapos < 0) return formattedname;
+        // switch the name order
+        String firstname = formattedname.substring(commapos+1).trim();
+        String lastname = formattedname.substring(0,commapos).trim();
+        return firstname + ' ' + lastname;
+    }
+    
     private ActionListener newEnterActionListener()
     {
@@ -110,4 +132,5 @@
                 // Extract the selected student name from the combo box
                 String userEntry = (String) userNameCombo.getSelectedItem();
+                userEntry = reverseLastFirst(userEntry); // switch name order
                 ScreenManager.setUserName(userEntry);
                 ScreenManager.openCADMenu();
@@ -216,6 +239,6 @@
         JLabel passwordLabel = new JLabel("Password  ");
         passwordLabel.setForeground(Color.WHITE);
-        passwordField = new JTextField("Not required");
-        passwordField.setEnabled(false);
+        passwordField = new JTextField("");
+        passwordField.setEnabled(true);
         Box passwordBox = new Box(BoxLayout.X_AXIS);
         passwordBox.setAlignmentX(LEFT_ALIGNMENT);
