[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Missing post? - see this post about spam for more information.
Not a question - for posterity - JComboBox does not drop in large JDialog  XML
Forum Index » GUI Development
Author Message
mrider

Newbie

Joined: 10/25/2005 11:50:02
Messages: 25
Offline

I've been going nuts over this for several days. I found the solution without Google's aid (grumble, grumble). Seems to me like it's worthwhile to record this for posterity. And although I haven't posted here many times, I think this is a good site, so I figured maybe I could drive some traffic here if is so happens that someone else has the same problem I did. EDIT I also posted this here -> http://forums.devshed.com/java-help-9/not-a-question-for-posterity-jcombobox-does-not-drop-in-large-jdialog-822739.html

I had the problem where a JComboBox used as a simple drop down (no edit functionality) in a custom dialog would not, um, drop. It started out only manifesting in Windows. Then after a bit of thrashing where I eventually replicated it in Linux, it seemed as if it only happened in certain look and feels. Finally I narrowed it down to the fact that the drop down would only drop if the bottom of drop down would go below the bottom edge of the window. The LNF part was driven by the fact that some LNFs are more compact than others, and so hence sometimes items in the drop down would cause the edge to exceed the window size limit.

Anyway, here's a sample program. This does not work properly. Do not use this!


The problem? I was adding content directly to the root pane. The corrected code which works looks like this:

This message was edited 3 times. Last update was at 06/08/2011 11:42:23

 
Forum Index » GUI Development
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2012 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle