Code example for JTextComponent

Methods: requestFocus

0
	 
	public boolean isEnabled() { return textComponent.isEnabled(); }
	 
	public int getCaretPosition() { return textComponent.getCaretPosition(); }
	 
	public void requestFocus() { textComponent.requestFocus(); }
	 
	public int getHeight() { return textComponent.getHeight(); }
	 
	public Rectangle modelToView() throws BadLocationException { return textComponent.getUI().modelToView(textComponent, textComponent.getCaretPosition()); }
 
	public void moveCarentToEndOfText() { textComponent.setCaretPosition(textComponent.getText().length()); }
	 
	public boolean isCarentAtEndOfTextAtInsertion() { return textComponent.getCaretPosition() == textComponent.getText().length() - 1; }
	 
	public boolean isCarentAtEndOfTextAtRemoval() { return textComponent.getCaretPosition() == textComponent.getText().length() + 1; }
	 
	public JTextComponent getTextComponent() { return textComponent; }
	 
	public void addKeyListener(KeyAdapter adapter) { textComponent.addKeyListener(adapter); }
Contextual code suggestions in your IDE  Get Codota for Java