This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to show this JComboBox? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to show this JComboBox?" Watch "How to show this JComboBox?" New topic

How to show this JComboBox?

arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
I was wondering why this JComboBox is not showingup, though if i try to use Choice it works with the same code.
Can you help me?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Instead of calling repaint(), you need to call

repaint just paints the component, validate sets up all the component's children. Since you are adding new components, validate needs to be called instead of repaint.


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Don't get me started about those stupid light bulbs.
subject: How to show this JComboBox?