@Override
	public void focusGained( FocusEvent e ) {
		if( !inInstall && !wasFocusTemporaryLost && (!isMousePressed || isSelectAllOnMouseClick()) )
			selectAllOnFocusGained();

		wasFocusTemporaryLost = false;
		wasFocused = true;

		super.focusGained( e );
	}
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