File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Issue with ComboBox and Windows L&F Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Issue with ComboBox and Windows L&F" Watch "Issue with ComboBox and Windows L&F" New topic
Author

Issue with ComboBox and Windows L&F

Michael Bunch
Ranch Hand

Joined: Jun 27, 2002
Posts: 31
Hi. I have a JComboBox and I am using the Windows L&F. I click on the arrow to extend the drop-down list, and when I click on the scroll bar the drop down list disappears. Why won't the ComboBox let me use the scroll bar? Has anyone else experienced this problem?
Lalit K Kumar
Ranch Hand

Joined: Jan 29, 2004
Posts: 32
hi,
It seems that you have missed out something. Try it once again right from the scratch. Select a combo, set its maximum row count (say at 3). implement your code to insert values in combo. and run it. i don't think it will give any problem.
mail back for confusion.
Michael Bunch
Ranch Hand

Joined: Jun 27, 2002
Posts: 31
I tried it again from scratch and it is still doing the same thing. I am not using a Layout Manager and I am setting the bounds manually. Do you think that might have something to do with it? It's like when I click the scrollbar on the JComboBox drop-down menu, the control thinks I have clicked off of it. Do you think it has anything to do with me using the Windows Look And Feel? When I use the default Java Look And Feel, the scrollbar on the combobox works fine. I am still confused.
Joe Crew
Ranch Hand

Joined: Apr 02, 2001
Posts: 49
Michael,
Are you executing any event code handling at all when you click on the scrollbar? Even if you think you are performing logical event handling something may be amiss. Also what OS are you running on? I have seen something similar while running on the Windriver operating system and it was a bug in their Java EVM. Also, on some operating systems you can't run the Windows Look and Feel.
Joe Crew
Michael Bunch
Ranch Hand

Joined: Jun 27, 2002
Posts: 31
I am not doing any event handling yet on the ComboBox. I am running Windows 2000. The code that implements the ComboBox is pretty straight-forward. I have it at its most basic implentation. Any other ideas on why this might be happening?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with ComboBox and Windows L&F