This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I'm trying jTextField.select(int, int) and jTextField.selectAll() to highlight data in error, and neither will work. I even tried jTextField.setSelectedTextColor(Color.red); to be sure I would have a contrasting color, still doesn't work. Can anyone help me get this working? Also, can anywone tell me how to move the cursor to the JTextField in error without selecting any text? Thank You in Advance for Your Help, Lou
Joined: Nov 11, 2003
As frequently happens, five minutes after I post a question I discover the answer. jTextField.requestFocus(); jTextField.selectAll(); or jTextField.select(int, int); To move the cursor only jTextField.requestFocus(); Happy Coding, Lou