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

    Default JComboBox-selected item

    Hello,

    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 Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default

    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.

    db

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, 04:02 PM
  2. Get the item in JComboBox
    By MaxMonic in forum AWT / Swing
    Replies: 1
    Last Post: 01-24-2011, 09:48 AM
  3. Replies: 4
    Last Post: 12-11-2010, 05:08 PM
  4. How to get the selected item from combox
    By man4ish in forum AWT / Swing
    Replies: 5
    Last Post: 12-30-2009, 10:29 AM
  5. Replies: 2
    Last Post: 12-10-2009, 01: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
  •