Results 1 to 6 of 6
  1. #1
    justlynn is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default tootip for each item (comboBox)

    Because i hv fixed my comboBox width, so some of my item cant be show complete.
    how can i assign tooltips when mouse over each comboBox item,
    then tooltips can show the item when mouse point to the item.

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

    Default

    Double post
    tooltip on comboBox

    db

  3. #3
    justlynn is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    anyone can help???!!!

  4. #4
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    I believe you need to use a custom renderer for the combo box. Then in the rendering code you can use the setToolTipText(...) method to set the tip for each item as it is rendered.

  5. #5
    justlynn is offline Member
    Join Date
    Jun 2010
    Posts
    18
    Rep Power
    0

    Default

    can teach me how to create renderer?? im new to java~
    thank you~

  6. #6
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    Read the JComboBox API and follow the link to the Swing tutorial on "How to Use Combo Boxes" for more information about renderers.

Similar Threads

  1. Add item to combobox permanently
    By efozdel in forum New To Java
    Replies: 18
    Last Post: 07-10-2010, 11:30 PM
  2. Problem in combobox
    By santhosh_el in forum AWT / Swing
    Replies: 4
    Last Post: 04-03-2009, 04:01 AM
  3. Need Help combobox
    By kwink in forum AWT / Swing
    Replies: 3
    Last Post: 03-21-2009, 10:05 AM
  4. combobox
    By chandu.v in forum New To Java
    Replies: 2
    Last Post: 07-02-2008, 08:36 PM
  5. HashMap and ComboBox
    By banie in forum AWT / Swing
    Replies: 2
    Last Post: 03-25-2008, 11: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
  •