Example usage for javax.swing JFormattedTextField selectAll

List of usage examples for javax.swing JFormattedTextField selectAll

Introduction

In this page you can find the example usage for javax.swing JFormattedTextField selectAll.

Prototype

public void selectAll() 

Source Link

Document

Selects all the text in the TextComponent.

Usage

From source file:TextInputDemo.java

protected void selectItLater(Component c) {
    if (c instanceof JFormattedTextField) {
        final JFormattedTextField ftf = (JFormattedTextField) c;
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                ftf.selectAll();
            }//from   w  w  w. j a v  a  2 s .c om
        });
    }
}