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: Combobox Problem

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Combobox Problem

    Hi,

    I have a combobox which is populated some some very long variable names.
    When i select one of these variables the name is displayed but because of the
    lenght of it it is being wrapped and i can only see the bottom half of the top
    line and the top half of the bottom line.
    Is there anyway to stop the wrapping.

    Any help would be appreciated.

    Thanks


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,301
    My Mood
    Hungover
    Thanks
    142
    Thanked 620 Times in 531 Posts

    Default Re: Combobox Problem

    Use a custom renderer. That's covered in the tutorial: How to Use Combo Boxes (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. ComboBox
    By rosebrit3 in forum AWT / Java Swing
    Replies: 1
    Last Post: October 25th, 2011, 12:47 PM
  2. [SOLVED] Populating second combobox from a combobox help!
    By ComputerSaysNo in forum AWT / Java Swing
    Replies: 7
    Last Post: October 18th, 2011, 09:01 AM
  3. problem related combobox nd database
    By harsimran in forum Java Theory & Questions
    Replies: 1
    Last Post: September 9th, 2011, 02:27 PM
  4. combobox unicode problem
    By trexi in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: January 18th, 2011, 10:06 AM
  5. Java program to display 2D Array in ComboBox
    By crazydeo in forum AWT / Java Swing
    Replies: 1
    Last Post: May 29th, 2008, 09:13 AM