Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Horizontal ScrollBar in JComboBox

Posted on 2002-06-23
3
Medium Priority
?
1,923 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

618 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