Is overriding requestFocus the right thing to do?
richard.bair at oracle.com
Mon Apr 22 08:32:46 PDT 2013
I know we had the same issue with combo box but I don't remember how it was handled. Forward events to the inner child, or actually move the focus and fake it out on the ComboBox? I think we did the latter since the TextField turns off caret animation etc when it isn't focused.
On Apr 19, 2013, at 8:50 AM, Randahl Fink Isaksen <randahl at rockit.dk> wrote:
> I have a parent with a number of children and some code which decides which one those children to give the focus to.
> While some of the child components are directly focusable (TextFields) one of the children, let us call it P, is a composite Parent component with many different text fields nested inside it.
> So what I have done, is to override requestFocus in P to delegate the requestFocus call to one of P's children.
> This has left me uncertain whether my override (which works) is the official way to achieve what I am trying to do, or if it only works coincidentally.
> If anyone could confirm that, I would be grateful. Thanks.
More information about the openjfx-dev