Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to add actionlistener to my combobox.
Here's my code..

private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
        String[] comboTypes = { "PDS" , "Salary Adjustment" , "Leave"};
        JComboBox comboTypesList =  JComboBox(comboTypes);
        comboTypesList.setSelectedIndex(0);
                JOptionPane.showMessageDialog( comboTypesList , "PDS");
Posted
Updated 7-Oct-10 2:55am
v2

1 solution

Sorry, where do you want add an action listener?This code is just an override method of its action listener...
What does this ActionListener do?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900