I’ve implemented a ComboBox using NetBeans that has a list of values, I want to be able to perform an action whenever the selected index has changed. An example being when a user changes the current item from Item 1 to Item 2.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a usage example from The Java Tutorials:
Edit:
An
ActionListenerisEdit 2:
Here’s another usage example to satisfy kleopatra, that is, one that is more exemplary of best practices: