adding 4 jTextfield will mess up what i have done Previously so i chose an array but i faced the following Problem i did this:
total=2*(length[0]+length[1]+length[2]+length[3]+length[4]);
total1=2*(length[0]+length[1]+length[2]+length[3]+length[4]+length[5]);
int f= total1-total;
for( int i=0; i<f; i++ )
{
for(int l=total;l<total1;l++)
{
text1=new JTextField(newString[l]);
text1.setBounds(newPos[l],newPos[l+1],100,30);
boolean editable = function[l].equals("true");
text1.setEditable(editable);
text1.setText("");
text1.addFocusListener(this);
panel.add(text1);
System.out.println("total: "+total1);
l++ ;
}
i++
}
However i cannot get the Array to stored in the value.. why??
when i call out text1[0] it jumps to the last value , so does all the others like text[1],[2]....
total=2*(length[0]+length[1]+length[2]+length[3]+length[4]);
total1=2*(length[0]+length[1]+length[2]+length[3]+length[4]+length[5]);
int f= total1-total;
for( int i=0; i<f; i++ )
{
for(int l=total;l<total1;l++)
{
text1=new JTextField(newString[l]);
text1.setBounds(newPos[l],newPos[l+1],100,30);
boolean editable = function[l].equals("true");
text1.setEditable(editable);
text1.setText("");
text1.addFocusListener(this);
panel.add(text1);
System.out.println("total: "+total1);
l++ ;
}
i++
}
However i cannot get the Array to stored in the value.. why??
when i call out text1[0] it jumps to the last value , so does all the others like text[1],[2]....