+ ((AbstractDocument) projectPathTextField.getDocument()).setDocumentFilter(new DocumentFilter() {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void insertString(FilterBypass fb, int offset, String string, AttributeSet attr) throws BadLocationException {
+ super.insertString(fb, offset, string.replaceAll("/", ""), attr);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException {
+ super.replace(fb, offset, length, text.replaceAll("/", ""), attrs);
+ }
+ });