Results 1 to 2 of 2
  1. #1
    nenadm is offline Member
    Join Date
    Nov 2008
    Rep Power

    Default JComboBox-selected item


    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.

    Best regards.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power


    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.


Similar Threads

  1. Why wont my JSP page display my selected item?
    By system32 in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-01-2011, 05:02 PM
  2. Get the item in JComboBox
    By MaxMonic in forum AWT / Swing
    Replies: 1
    Last Post: 01-24-2011, 10:48 AM
  3. Replies: 4
    Last Post: 12-11-2010, 06:08 PM
  4. How to get the selected item from combox
    By man4ish in forum AWT / Swing
    Replies: 5
    Last Post: 12-30-2009, 11:29 AM
  5. Replies: 2
    Last Post: 12-10-2009, 02:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts