PDA

View Full Version : How to know the type of form field at run time ?



muncher
19 Jul 2010, 1:59 PM
I have a form with various textboxes, combos, and some checkbox group. I would want to know at run time what the items of the form are. Some of them are extended. For example I have number of pre initialized comboboxes, for me knowing that it is a combobox is good. How do I do that ? does every item have getXType() method defined ?

muncher
19 Jul 2010, 2:29 PM
use instanceof operator.



NJoy posting solutions to ur own qs. \m/