NumberOfSimbolsWithSpaces = 0;NumberOfSimbolsWithoutSpaces = 0;String plainTextComponent.getString ();for (int i=0; i<String.size (); i++){ if (String[i] != whiteSpace) NumberOfSimbolsWithoutSpaces ++; NumberOfSimbolsWithSpaces ++;}Label1.setText (NumberOfSimbolsWithoutSpaces);Label2.setText (NumberOfSimbolsWithSpaces);