It's not a secret anymore!
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
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.
I agree. Here's the link:
subject: How to show this JComboBox?
It's not a secret anymore!