kohinoor2007
Programmer
Hi,
One of my function calls return something as follows.
Set<String> tags = test.GetTags();
Want to put these strings into a comboBox on creation.The combobox constructor are as follows:
JComboBox(Object[])
JComboBox(Vector)
Is it possible to convert the "Set" collection to an Object or vector...
Tried
Object[] a = tags.toArray(); // But there was an error ,that cant convert string to object[].
List<String> test = new ArrayList<String>(test.GetTags()); // This returns a List,but want a vector or Object.
Is there any way around ,instead of creating a vector or Object type , & putting all the elements into it...
Thanks
One of my function calls return something as follows.
Set<String> tags = test.GetTags();
Want to put these strings into a comboBox on creation.The combobox constructor are as follows:
JComboBox(Object[])
JComboBox(Vector)
Is it possible to convert the "Set" collection to an Object or vector...
Tried
Object[] a = tags.toArray(); // But there was an error ,that cant convert string to object[].
List<String> test = new ArrayList<String>(test.GetTags()); // This returns a List,but want a vector or Object.
Is there any way around ,instead of creating a vector or Object type , & putting all the elements into it...
Thanks