//*********************************************************************************
// class tig.swing.JTextField2
// Software released under the General Public License (version 2 or later), available at
// http://www.gnu.org/copyleft/gpl.html
//*********************************************************************************
package tig.swing;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
/******************************************************************************
When this text field gets the focus, its text is selected.
@author Thierry Graff
@history mar 01 2002 : reation.
*********************************************************************************/
public class JTextField2 extends JTextField{
//=================================================================================
// CONSTRUCTORS
//=================================================================================
public JTextField2(){
super();
}
public JTextField2(String text, int columns){
super(text, columns);
}
public JTextField2(String text){
super(text);
}
public JTextField2(int columns){
super(columns);
}
//=================================================================================
// PUBLIC METHODS
//=================================================================================
protected void processFocusEvent(FocusEvent e){
super.processFocusEvent(e);
setSelectionStart(0);
setSelectionEnd(getText().length());
}// end processFocusEvent()
}//end class JTextField2