regarding j combo box...

hi guys i hav created a combo box...something like

String [] provinces = {

"Alava",

"Albacete",

"Alicante",

"Almeria"

};

JComboBox pro = new JComboBox(provinces);

now if i wan to retrieve the selected item how can i do it...i tried pro.getSelectedItem but it gives the error of null pointer...is it because the getselected item returns an object but then i tried to pass an array of Objects as well...but in vain..

[475 byte] By [maybesomeday...a] at [2007-11-27 10:50:58]
# 1

http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html

Follow the bouncing link.

PS.

puckstopper31a at 2007-7-29 11:28:26 > top of Java-index,Java Essentials,Java Programming...