You can override this behavior with the following: textfield.setCaret(new DefaultCaret()). We install a custom Aqua caret in every text field to modify the default selection behavior provided by Swing to match the native behavior of Mac OS X text widgets. If you are doing any sort of advanced selection manipulation, you might want to look into installing your own custom subclass of DefaultCaret as well.
Cheers,
Mike Swingler
Java Runtime Engineer
Apple Inc.
Radar #4890361
JTextFields did not match the native focus/selection behavior of Mac OS X
Description:
JTextFields now select their contents when they gain focus though keyboard tab cycling. If the insertion point is in the middle of the text, the insertion point will remain and the entire text will not be selected.
Resolution:
This problem is now fixed in Mac OS X 10.5.
Go carefully through wherever it is you are loading the .jar and check all the CLASSPATH variables to make sure they match.
Originally posted by Edward Chen:
Thanks.
But the problem is , how could I know if it supports MMAPI or not ? Have a website to check which vendor device supports which java API ?
Thanks again.