> Actually thinking again is there any way to use
> ActionEvent.getSouce() and distinguish if a JButton or JComboBox
> were used and then which button and what value in combobox without
> using setActionCommand?
It sounds like you're looking for the instanceof operator.

Signature
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Roedy Green - 13 Feb 2006 22:04 GMT
On Mon, 13 Feb 2006 13:56:40 -0700, "Monique Y. Mudama"
<spam@bounceswoosh.org> wrote, quoted or indirectly quoted someone who
said :
>It sounds like you're looking for the instanceof operator.
see http://mindprod.com/jgloss/instanceof.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
> Actually thinking again is there any way to use ActionEvent.getSouce()
> and distinguish if a JButton or JComboBox were used and then which
[quoted text clipped - 3 lines]
>
> Ben.
Yes, source instanceof JComboBox for example.
But, what if you will have more than one JComboBox?
If you started mark your buttons by setActionCommand(String)
you may continue it with JComboBox too.
Or you may set to any Component name as identifier