EditorTextField (Document document) { EditorTextField field = new EditorTextField(document, myProject, myFileType) { @Override protected boolean shouldHaveBorder() { return false; } }; field.setBorder(new EmptyBorder(1, 1, 1, 1)); return field; }