Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JComboBox/ActionListener not working 1

Status
Not open for further replies.

gh0st32

Programmer
Jan 24, 2008
8
0
0
US
Hi All,

First let me state I have searched both the threads and FAQ for answers and I have not found any.

I have a JComboBox that has a ActionListener assigned to it. The code is as follows...

JComboBox idList = new JComboBox(results_txt);//results_txt comes from a SQL DB
idList.addActionListener(this);
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==idList)
{
System.out.println("made it here");
}
}
The actionPerformed method has several other sources that work as they should. I tested the combobox using a itemlistener and I can get values from it. For some reason the actionlistener does not 'listen' to the combo box. If anyone can provide assistance it would be appreciated. If you need to see the source code let me know.

Cheers

 
thanks its been about 7 years since I have done anything in Java.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top