This is a feature, perhaps not completely thought out,
rather than a bug.
Java 1.4 changed quite a few details of focus cycle handling. The
changes are pretty well documented if you start with the overview
in the on-line docs: api/java/awt/doc-files/FocusSpec.html
What you've run into is automatic focus transfer _from_ a component
that's being disabled or hidden. This is an intentional feature,
mentioned toward the end of the Programmatic Traversal section of
the FocusSpec documentation. But as you're found out, there is a
delay between deciding to do a transfer and actually doing it.
This can conflict with your own manual transfers that take place
during the delay. You can move the focus _before_ disabling the
component, or you can attempt to delay your transfer until after
the already delayed automatic transfer. The first option is more
reliable.
In addition to the problem you've encountered, there are some "duh"
bugs related to automatic focus transfer. See BugID 4685768 in the
Java Bug Parade, for example. The main purpose of automatic focus
transfer is to make sure focus never gets stuck on an disabled
component, thus improving keyboard navigability (and accessibility).
Yet automatic focus transfer can _send_ focus to a disabled component.