Hi all,

here's an interesting problem. I have a dynamically generated series of text fields 
which store the values of certain entities. Now, i have a field called comment (there 
is only one location to display the comment). I need to associate comments with the 
value text field highlighted..i.e. the user highlights a perticular value field and 
then enters the corresponding comment in the comment field (simillar to an excel 
spreadsheet). 

What I am doing currently is that i have vectors to store the value text fields and 
the corresponding  comment text fields. Hence correct values are stored (manipulating 
the focus) The only problem is that since there is only one location to display the 
comment, the correct comment field doesn't get displayed. 

It would be really nice if somebody can try out a sample code and help me with this 
problem, or suggest a fresh approach. 

Thanx,
Pallika.

p.s. here's a part of the code, just in case it helps..

public void focusGained(FocusEvent e){  
  for(int i=0; i<(skillVector).size(); i++) {   
     if((((labskill)((skillVector).get(i))).value) == e.getSource()) {           
        (((labskill)((skillVector).get(i))).value).setBackground(Color.lightGray);
        (((labskill)((skillVector).get(i))).comment).setVisible(true);          
     }
     else {
       (((labskill)(skillVector).get(i))).value).setBackground(Color.white);
       (((labskill)(skillVector).get(i))).comment).setVisible(false);
     }
 }   
}



_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to