Hi
am new in java and am trying to use two combo box where when i select a an option in the first combo box which are table names it displays the table field name of that table in the second combo box. the first combo box has an event listener and selects the field name automatically. if any one has a idea pleas help.

this was my idea but did not work.
JCombobox cmbsearch= new JCombobox();
JCombobox cmbwhere= new JCombobox();
Object c=cmbsearch.getSelectedItem();
if(c.equals( Equipment)){
cmbwhere.setModel(new javax.swing.DefaultComboBoxModel(new String [] {"Tag_no","Equipment_Description","Serial_no","Dep atment_id"}));
}
if (c.equals(Movement))
{
cmbwhere.setModel(new javax.swing.DefaultComboBoxModel(new String [] {"Tag_No","Item_Name","Name","ID_No","Room"}));
}
if(c.equals(Persons)){
cmbwhere.setModel(new javax.swing.DefaultComboBoxModel(new String [] {"First_name","Last_name","persons_id"}));