Hello, i need to add listener to a combobox called complementComboBox that
depends on textfield called numtxtfield, once the user enter the num value,
the combobox must get data of complement that have the same num.
 i used an ActionListener on the comboBox but i get nothing on m comboBox
here's the code:
NB: searchProperties is the instance of SearchProperties() that contains
graphical components:

final List<String> attributeComplement = new ArrayList<String>();
searchProperties.getComplementComboBox().addActionListener(new
ActionListener(){
   public void actionPerformed(ActionEvent e) {

   for(BasicFeature basicFeature : list) {
String complement;
if (
searchProperties.getNumTextField().getText().equals(basicFeature.getString("num")))
{
 complement =basicFeature.getString("complement");
     attributeComplement.add(complement);
}
   }
searchProperties.getComplementComboBox().setModel(new
DefaultComboBoxModel(attributeComplement.toArray()));
   }


   });

-- 
*Asma OUQALLI*

Élève ingénieur : 3ème  Sciences d'Information Géographique (SIG).
Chef de commission développement professionnel  - Rotaract EHTP.
Chef de cellule Media - Olympiades EHTP 2012.
  Ecole Hassania des Travaux Publics.
   Mobile : +212 672 48 23 15.
   Email : asma.ouqa...@gmail.com
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to