Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: KeyListener not working for JLIST Component.

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default KeyListener not working for JLIST Component.

    Hi All,

    Cursor control is not working for JLIST component.

    My application has combobox which is used to multiselect the list of JLIST items.

    Combobox--> JPopupMenu--> JList.

    When an item is selected in JList through mouse, combobox text field will be updated with those selected values. So next time when the focus comes to this Combobox, it opens the popupmenu with the selected JList items.

    MouseListeners are working absolutely fine. But KeyListener is not working.
    I am able to set the focusGained and FocusLost event for Combobox but unable to get the focus and cursor control to JList component.

    please give a lead on this.

    Regards
    Nagesh


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,145
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: KeyListener not working for JLIST Component.

    Can you post a small, complete program that compiles, executes and shows the problem?
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. [SOLVED] keyListener keyPressed not working
    By hogsgonewild in forum What's Wrong With My Code?
    Replies: 19
    Last Post: October 13th, 2013, 02:34 PM
  2. keyListener not working
    By soradogoof in forum Java Applets
    Replies: 2
    Last Post: August 14th, 2012, 05:33 PM
  3. My KeyListener is not Working!!
    By DarrenReeder in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 28th, 2010, 05:18 PM
  4. How to Use the JList component - Java Swing
    By neo_2010 in forum Java Swing Tutorials
    Replies: 1
    Last Post: July 11th, 2009, 04:02 AM
  5. How to Use the JList component - Java Swing
    By neo_2010 in forum Java Code Snippets and Tutorials
    Replies: 1
    Last Post: July 11th, 2009, 04:02 AM