Solved

# How to pass array to a jTable

Posted on 2011-02-11

Dear All,

this is my code.

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

double i[]=new double[100000];

double a=Double.parseDouble(jTextField1.getText());

double b=Double.parseDouble(jTextField2.getText());

double m=Double.parseDouble(jTextField3.getText());

jButton1.setEnabled(false);

i[0]=10; //Starting Value

//Generating Random Numbers

for(int j=1; j<i.length; j++) {

i[j]=(((a*i[j-1]+b)%m)/m);

}

//Arranging the Randomly Generated Numbers into Order.

jTable1....................................................

jButton1.setEnabled(true);

}

and i want to show the values of array i[] to jTable1, how can I do this.