JComponent (JComponent component) { Border border = ClientProperty.get(component, FileEditorManager.SEPARATOR_BORDER); if (border == null) return component; Wrapper wrapper = new InvisibleWrapper(); wrapper.setContent(component); wrapper.setBorder(border); return wrapper; }