This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JComobBox mouse problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JComobBox mouse problem" Watch "JComobBox mouse problem" New topic
Author

JComobBox mouse problem

Cy Bird
Greenhorn

Joined: Feb 18, 2003
Posts: 16
I have a JDialog with a JComboBox on it. The first time a open the form all is fine. All subsequent times, the comboBox can be expanded, but I can't click on any of the items. However, the keyboard can select an item. I have other comboboxes that work fine, but their lists are hard-coded. This combobox gets its values from the db.
Anyone seen this?
(jdk 1.4.X)
Krishnaaaa Rao
Greenhorn

Joined: Feb 18, 2003
Posts: 1
use setPreferredSize(Dimension d) on the combo box
Cy Bird
Greenhorn

Joined: Feb 18, 2003
Posts: 16
setPreferredSize() didn't actually fix my problem. I did find a workaround though... I'm reusing the JDialog in question. On the close of the window, I call dispose(). It fixes my problem (my combo is now 'clickable') and it never actually releases the form back to memory. I verified this with JProfiler. Strange side effect!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JComobBox mouse problem
 
Similar Threads
!!!! URGENT !!!!! JComboBox popup problem
refresh the contents of combobox
Jsp
Can we have ComboBox in the JTable Header?
JTable Cell Editor