Tested on 1.5.0_09 and 1.5.0_10(system default java) on s10s_u2wos_09a SPARC.
The problem is not seen on 1.5.0_09, but the problem starts in 1.5.0_10.
In 1.5.0_10, 6228914 is backported from JDK6 and the a part of the changes in X11InputMethod.java seems to be the cause of this issue. More updates will follow.
6228914 is a perf improvement fix.
Tested with latest JDK6U3 build.
A part of the fix for 6228914 (specifically changes in X11InputMethod.java) is the cause of the problem.
The changes in X11InputMethod.java addresses the following:(copied from its evaluation)
1. Delay resetting the XIC focus when deactivate is called and record the current XIC focussed component.
2. When activate is called, compare the current focused component peer with the saved XIC focussed component peer. If they are same, no need to take any actions (calling setXICFocus). Otherwise, reset the old XIC focus and set the XIC focus for the new focussed component.