?
Solved

Horizontal ScrollBar in JComboBox

Posted on 2002-06-23
3
Medium Priority
?
1,896 Views
Last Modified: 2012-05-04
I have made a combo box but the length of characters dispalyed is longet the hieght I have set. I have no option to increase the height but the ComboBox only gets the vertical scrollbar and not the horizontal scrollbar. Is there a way out for the same so that a horizontal scrollbar appears.

Second if that is not possible(to set the horizontal scroll bar) then how to show a toop tip of a particular item in scroll bar so that it appears completely.

0
Comment
Question by:dumdum420
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 26

Expert Comment

by:ksivananth
ID: 7102680
Hi  dumdum420,

     I think the following will be useful for you in setting the tool tip.

class test
{
  JComboBox comboBox = new JComboBox() ;

  public void test()
  {
    comboBox.addItemListener( new ItemListener()
      {
        public void itemStateChanged( ItemEvent ie )
        {
          String strComboItem = comboBox.getSeletedItem().toString() ;
          comboBox.setToolTipText( strComboItem ) ;
        }
      }
  }

}    

siva
0
 
LVL 5

Accepted Solution

by:
Calron earned 90 total points
ID: 7103051
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 7103138
Sorry, what I said is wrong altogether. I think the links given by carlon will cater your need.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question