void (JTextField component, @NotNull String text) { final int len = text.length(); if (len > 0 && text.charAt(len - 1) == File.separatorChar) { text = text.substring(0, len - 1); } component.setText(text); }