*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to show this JComboBox?" Watch "How to show this JComboBox?" New topic
Author

How to show this JComboBox?

arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Hi,
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?
regards,
arun
Nathan Pruett
Bartender

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.

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to show this JComboBox?
 
Similar Threads
How to listen toolbar buttons?
why this component access is multiplying?
Why this object gets null in actionPerformed
I want to insert Data into the pie chart.I have put the code to gernate the Pie
Can you help me to write better code ?