Hi Shakila,
firtly i'm sorry to misunderstand ur problem in my earlier post.now regarding ur problem i wrote two small program. and the conclusion i came to is that may be u r mixing awt component with swing component.(e.g. u r adding swing components on a awt Frame instead of JFrame.).
just run these two programs
------------------------------------------------------
this program will give same problem as u r facing import javax.swing.*;
import java.util.*;
import java.awt.*;
class Combo
{
public static void main(
String h[])
{
Frame f = new Frame();
Vector v = new Vector();
v.add("Hi");
v.add("Hello");
v.add("Happy");
JComboBox jbx = new JComboBox(v);
JTextField jfld = new JTextField("JTextField");
f.setLayout(null);
jbx.setBounds(50,50,50,25);
jfld.setBounds(50,80,50,25);
f.add(jbx);
f.add(jfld);
f.setSize(300,300);
f.setVisible(true);
}
}
------------------------------------------------------
==============================================================
this will run perfectly since i've replced the frame of first program with JFrame import javax.swing.*;
import java.util.*;
class Combo
{
public static void main(String h[])
{
JFrame f = new JFrame();
Vector v = new Vector();
v.add("Hi");
v.add("Hello");
v.add("Happy");
JComboBox jbx = new JComboBox(v);
JTextField jfld = new JTextField("JTextField");
f.getContentPane().setLayout(null);
jbx.setBounds(50,50,50,25);
jfld.setBounds(50,80,50,25);
f.getContentPane().add(jbx);
f.getContentPane().add(jfld);
f.setSize(300,300);
f.setVisible(true);
}
}
-----------------------------------------------------
so just make sure u r not mixing awt and swing components.
one more thing if u solve this problem then do let us know.
coz it seems to be interesting.
regards
deekasha