void (@NotNull JPanel previewPanel) { previewPanel.setLayout(new BorderLayout()); previewPanel.add(getEditor().getComponent(), BorderLayout.CENTER); previewPanel.setBorder(new AbstractBorder() { private static final int LEFT_WHITE_SPACE = 2; @Override public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Editor editor = getEditor(); if (editor instanceof EditorEx) { g.setColor(((EditorEx)editor).getBackgroundColor()); g.fillRect(x + 1, y, LEFT_WHITE_SPACE, height); } g.setColor(OnePixelDivider.BACKGROUND); g.fillRect(x, y, 1, height); } @Override public Insets getBorderInsets(Component c, Insets insets) { insets.set(0, 1 + LEFT_WHITE_SPACE, 0, 0); return insets; } }); }