selectAll « JTextField « Java Swing Q&A





1. select all on focus in lots of jTextField    stackoverflow.com

I have lots of jTextFields in my application (About 34 jTextFields) and I want all of them select all of their text when get focus and select none of text on ...

3. selectAll() in a JTextField    coderanch.com

I'm not aware of any issues with this in JDK1.4 but here are a couple things you can try: 1. After calling selectAll(), call revalidate() and repaint() on your JTextField component. Reasoning is it may actually be selected but may not be rendered properly. 2. If that doesn't work try using a different method, for example: yourTextField.select(0,length-1) If neither of these ...

4. selectAll method on JTextField?    forums.oracle.com