I would like to know if anyone has any idea of how to order the passage of focus between the components of a panel? I already tried in this way and it did not give me results:
contentPane.setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{
btnInfoClientes, btnInfoClientesPep, btnInfoClienteEspe, btnInfoRubroEspe, btnInfoTransacciones,
btnInfoTransaccionesAmpl, btnInfoTransaccionesRec, btnInfoTransaccionesEnv, txtSucuTran, txtAno,
txtBoletaTran, btnBoleta, txtCodPersona, txtDocumento, txtNombre, txtApellido, btnBuscar}));
That would be the desired order, and as I read in some manuals, the setFocusTraversalPolicy
method is one of the forms, but it does not follow the specified guidelines.
Another way I tried this method is also:
btnInfoClientes.setNextFocusableComponent(btnInfoClientesPep);
But apart from being deprecated the method, does not follow the desired route either.
I do not know if it would influence something, but the layout of my JPanel is Absolute:
contentPane.setLayout(null);