Java JTextComponent Select selectAndRequestFocus(JTextComponent editor)

Here you can find the source of selectAndRequestFocus(JTextComponent editor)

Description

select And Request Focus

License

Apache License

Declaration

public static void selectAndRequestFocus(JTextComponent editor) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.swing.text.JTextComponent;

public class Main {
    public static void selectAndRequestFocus(JTextComponent editor) {
        editor.requestFocusInWindow();//from w w  w.  ja va 2  s .  c o  m
        editor.selectAll();
    }
}

Related

  1. isSelectionUpperCase(JTextComponent textPane)
  2. replaceSelectionAndSelect(JTextComponent component, String text)
  3. selectAll(final JTextComponent textComponent)
  4. selectAll(JTextComponent textComponent)
  5. selectAllOnFocus(JTextComponent textComponent)
  6. selectFirstArg(String strText, int initialSelectionStart, JTextComponent editor)
  7. selectionToUpperCase(JTextComponent textPane)
  8. selectLines(JTextComponent target)
  9. toggleSelectionUpperCase(JTextComponent textPane)