void (final boolean enable, final EditorEx @NotNull ... editors) { for (final EditorEx editor : editors) { final Color backgroundColor = editor.getBackgroundColor(); // Border have the same color console background has final int thickness = enable ? BORDER_SIZE_PX : 0; final Border border = BorderFactory.createMatteBorder(0, thickness, 0, 0, backgroundColor); editor.getComponent().setBorder(border); } }