jcombo box focus

hii was wondering how to find out which item has been chosen in a combo box? the reason is that i would like specific buttons to be disabled depending on what option was chosen in the combo box. should i use focus lost and focus gained for this?thanks
[272 byte] By [cmur8594a] at [2007-10-3 4:49:59]
# 1

In the future, Swing related questions should be posted in the Swing forum.

> was wondering how to find out which item has been chosen in a combo box?

Read the JComboBox API. One of the "get...." methods will do what you want. Or you could also follow the "How to Use Combo Boxes" link which shows you how to respond to a selection of an item in the combo box..

camickra at 2007-7-14 22:54:33 > top of Java-index,Java Essentials,Java Programming...
# 2

As camickr said, the api or "how to's..." for the jcombobox will give you what you

need.

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

The Java Tutorial is a great resource for java. You might save yourself a lot of time by consulting it or the api.

java.langa at 2007-7-14 22:54:33 > top of Java-index,Java Essentials,Java Programming...