Results 1 to 2 of 2
Thread: JComboBox-selected item
- 05-27-2011, 11:58 AM #1Member
- Join Date
- Nov 2008
- Rep Power
I am interested is there any way to intercept event of selecting something in JComboBox pop-up container. What i want to do if user clicks on some item in pop-up:
1. I want to add item to editor component (this is default behaviour)
2. After that i want to get that item from editor and call some method.
So user should only click on some item in popup for both actions.
- 05-27-2011, 12:58 PM #2
Read the API for JComboBox and follow the link to the Swing tutorial on How to Use Combo Boxes. After you've gone through the tutorial, if you still have a question post a SSCCE that demonstrates your problem and we'll take a look.
- By system32 in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 04-01-2011, 04:02 PM
- By MaxMonic in forum AWT / SwingReplies: 1Last Post: 01-24-2011, 10:48 AM
- By phil128 in forum AWT / SwingReplies: 4Last Post: 12-11-2010, 06:08 PM
- By man4ish in forum AWT / SwingReplies: 5Last Post: 12-30-2009, 11:29 AM
- By bahumbaba in forum AWT / SwingReplies: 2Last Post: 12-10-2009, 02:58 PM