Within a GenericDialog, I would like to set the focus on a given Choice within the Dialog when it gets displayed.
And browsing through forums, I managed to perform this using the following code:
Vector choices = gd.getChoices();
final Choice myChoice = (Choice)(choices.elementAt(2));
gd.addWindowListener( new WindowAdapter()
public void windowOpened( WindowEvent e )
which seems nevertheless quite complicated to me.
Thus did I miss something and could such a job be done more easily?
Thanks a lot in advance for your replies on this and have a nice evening,
Laboratoire de Bioimagerie et Pathologies
UMR 7021 CNRS - Université de Strasbourg
Faculté de Pharmacie
74 route du Rhin
Tel : +33(0)3 68 85 42 89