@Override public int compare(CFButton lhs, CFButton rhs) { if (lhs == null) { if (rhs == null) { return (0); } else { return (-1); } } else if (rhs == null) { return (1); } else { int retval = lhs.getText().compareTo(rhs.getText()); return (retval); } }