@NotNull
  private static String toIdentifier(@NotNull String s) {
    final StringBuilder result = new StringBuilder();

    for (int i = 0, n = s.length(); i < n; i++) {
      final char c = s.charAt(i);

      if (Character.isJavaIdentifierPart(c)) {
        if (i == 0 && !Character.isJavaIdentifierStart(c)) {
          result.append('_');
        }
        result.append(c);
      } else {
        result.append('_');
      }
    }
    return result.toString();
  }
  public void updateClassNameAndIcon() {
    if (!isMIDlet) return;
    removeThisListeners();

    String name = tName.getText();
    final StringBuffer sb = new StringBuffer();
    for (int a = 0; a < name.length(); a++) {
      final char c = name.charAt(a);
      if (!Character.isJavaIdentifierPart(c)) continue;
      if (sb.length() <= 0 && !Character.isJavaIdentifierStart(c)) continue;
      sb.append(c);
    }
    name = sb.toString();

    if (updateClassName) tClassName.setText(name);

    addThisListeners();
  }