Graphics2D (@NotNull Graphics g, @NotNull Component divider, @NotNull Component base) { int width = divider.getWidth(); int editorHeight = base.getHeight(); int dividerOffset = divider.getLocationOnScreen().y; int editorOffset = base.getLocationOnScreen().y; return (Graphics2D)g.create(0, editorOffset - dividerOffset, width, editorHeight); }