how to write the value of JComboBox

Hi Allhow to write the value of JComboBox, when the user selected?i.e. if i have text filed age and a JComboBox 20,30,40 and so oni want to save the age with the user selected item from JComboBox?any ideas
[240 byte] By [TheNewLeadera] at [2007-11-26 15:58:53]
# 1
http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html
suparenoa at 2007-7-8 22:20:02 > top of Java-index,Java Essentials,Java Programming...
# 2

Thanks for the useful link

but what i need is how to write the JComboBox when it is appear in the line

i.e if i have the following line

Name Hana Age JComboBox Major JComboBox

and i need to save all this line in a text file

JLabel JTextfiled JLabelJComboBox JLabel JComboBox

TheNewLeadera at 2007-7-8 22:20:03 > top of Java-index,Java Essentials,Java Programming...