i have 2 classes 1 main with methods and a gui file on the mainfile I have an aDD method.
[code=java]
public void aDD(JTextField a, String[] r)
{
int x=0;
while(x<r.lengt h)
{
r[x]=a.getText();
x++;
}
}
[/code]
and on my gui I have 1 that returns values to the main method
[code=java]
if (z.getSource()= = add)
{
a3.aDD(f,x);
f.setText("");
}
[/code]
p.s.f=text area, x is a String array;
can u help me correct my mistake
[code=java]
public void aDD(JTextField a, String[] r)
{
int x=0;
while(x<r.lengt h)
{
r[x]=a.getText();
x++;
}
}
[/code]
and on my gui I have 1 that returns values to the main method
[code=java]
if (z.getSource()= = add)
{
a3.aDD(f,x);
f.setText("");
}
[/code]
p.s.f=text area, x is a String array;
can u help me correct my mistake
Comment