I have a JComboBox named c , which i have kept editable , i want to call a function named search() whenever any key is pressed/released in that ComboBox ? i tried this but this neither calls my function nor does the job i have written in if() when the condition is true.I have a JComboBox named c , which i have kept