Re: FocusTraversalPolicy




"Big Jim" <noone@xxxxxxxxxxx> wrote in message news:%QdCf.66942$q4.44258@xxxxxxxxxxxxxxxxxxxxxxx
> Has anyone written a decent one?
>
> I had an app that worked fine in 1.3, in 1.4 the focussing is a disaster.
> I have JDesktop panes, JIternalPanes and JTabbed panes containing JTables, JComboBoxes,
> JTextFields etc.
>
> Using ContainerOrderFocusPolicy I can't get initial focus to work, it's take 2 or 3 tabs sometimes
> to move from one component to the next etc. I guess it's stepping out to parent panes and then
> back or something even though I've set everything to focusable(false) except the items I want to
> land on.
> I wrote a pretty basic policy but it's not handling compound components properly (a JComboBox I've
> made AutoCompletable) and I haven't covered any of the up/down cycle stuff or checked for no
> enabled components. Does anyone have anything more complete? (I'm no swing expert)
>
> Cheers, Richard.


some of the code in this thread might suit you

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=2&t=013092


.