Registering 2 combo Boxes to listener separately

Hi,

I have 2 combo boxes in swings.I want to perform different operations on actions of both of the combo boxes.

##Now, I am registering them to action listener and identifying action through

if (command.equals("comboBoxChanged"))

But : Through this not able to distinguish 2 combo boxes separately

Plz tell me how can i perform different actions for different combo boxes

Bye

[422 byte] By [chatservera] at [2007-10-2 19:18:22]
# 1

combobox1.addActionListener(new ActionListener(){

public void actionPerformed (...){

// do stuff for combo 1

}

});

combobox2.addActionListener(new ActionListener(){

public void actionPerformed (...){

// do stuff for combo 2

}

});

BaltimoreJohna at 2007-7-13 21:01:00 > top of Java-index,Security,Event Handling...