@Override
	protected void adjustVisibility( Rectangle nloc ) {
		JTextComponent c = getComponent();
		if( c != null && c.getUI() instanceof FlatTextFieldUI ) {
			// need to fix x location because JTextField.scrollRectToVisible() uses insets.left
			// (as BasicTextUI.getVisibleEditorRect() does),
			// but FlatTextFieldUI.getVisibleEditorRect() may add some padding
			Rectangle r = ((FlatTextFieldUI)c.getUI()).getVisibleEditorRect();
			if( r != null )
				nloc.x -= r.x - c.getInsets().left;
		}
		super.adjustVisibility( nloc );
	}
Caret that can select all text on focus gained.
Also fixes Swing's double-click-and-drag behavior so that dragging after
a double-click extends selection by whole words.

@author Karl Tauber
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatCaret.java