So I am reading a file and I get the amount of lines in that file. Based on that I generate my interface. Now I need to have the ability to edit valus trougth UI . Rows is the variable that has how lines the input document has . Of course the code below doesnt work . I want to write new values to the array from which i read .
for(int i=0;i<Rows;i++)
{
//System.out.println("!"+Symbol[1]+"!");
//if(Symbol[i]!=""&&Symbol[i]!=null)
// {
JTextField symbol = new JTextField(6);
symbol.setText(Symbol[i]);
symbol.setBounds(10,25*i+10 , 75, 20);
symbol.setEditable(false);
frame.add(symbol);
JTextField buyf = new JTextField(4);
buyf.setText(String.valueOf(buy[i]));
buyf.setBounds(95, 25*i+10, 50, 20);
buyf.setEditable(true);
buyf.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent ae) {
buy[i]=Integer.parseInt(buyf.getText());
}
});
frame.add(buyf);
}