Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

ComboBox: keep the pull down?

Thread view: 
minjie@excite.com - 28 Mar 2006 16:58 GMT
Hello,
Is there a method to keep the pull down for a ComboBox, i.e., the user
does not have to click on the ComboBox in order to pull down the list?
Thanks.
Carl - 28 Mar 2006 18:49 GMT
Hello,

If I understand your question correctly, I would suggest you may want
to use a JList instead of a ComboBox. For more details, see:

http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JList.html
and
http://java.sun.com/docs/books/tutorial/uiswing/components/list.html#selection

Carl.
Andrey Kuznetsov - 28 Mar 2006 18:51 GMT
> Is there a method to keep the pull down for a ComboBox, i.e., the user
> does not have to click on the ComboBox in order to pull down the list?

you probably need JList.

Signature

http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities

Roedy Green - 28 Mar 2006 20:50 GMT
>Is there a method to keep the pull down for a ComboBox, i.e., the user
>does not have to click on the ComboBox in order to pull down the list?

see http://mindprod.com/jgloss/jlist.html. it is like a JComboxBox
that stays open. You can put it is a JScrollpane it if gets too big.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

minjie@excite.com - 28 Mar 2006 21:01 GMT
> >Is there a method to keep the pull down for a ComboBox, i.e., the user
> >does not have to click on the ComboBox in order to pull down the list?
[quoted text clipped - 5 lines]
> Canadian Mind Products, Roedy Green.
> http://mindprod.com Java custom programming, consulting and coaching.

Hi Guys, thank you all very much. A user requested to have that
ComboBox open by default, but reduce it when he wants to. I guess it's
not doable. Looks like I have to either use a JList to keep it open all
the time, or keep the ComboBox and have the user click on it to open
the list.
Carl - 28 Mar 2006 21:45 GMT
Sorry, from your initial post I got the impression that you were not
aware of the JList component.

If you are sure you only want to modify the state of a JComboBox you
should have a look at the setPopupVisible(boolean) method of the
JComboBox.

Carl.
minjie@excite.com - 28 Mar 2006 22:31 GMT
Hello Carl, thanks a lot! It worked!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.