How to get data type of the selected item of JComboBox in java
843806Oct 23 2008 — edited Oct 23 2008Hello,
As the getSelectedItem(); method of jComboBox return the Item with Object data type. I want to convert this Data type into premitive or non-premitive data type. How could I do this. For example I get the selected Item and now I want to convert this into String. How could I accomplish this. I have tried to use Wrapper Classes but of no use as it gives an error.
Actually I want to get selected Item but not with object data type but with other (premetive preferalbe).Kindly help me in this regards.
Thanks,
Danish Kamran