Need help with Tables Handling

This is a tricky problem, maybe not for you guys, here it is:

I have a table with 4 colums and N rows, i want to write data (int) on the 1st and 3rd columns and In the 4th column I want to show up the result of 1st X 3rd (1st times 3rd), I tried many times but so far I've got nothing good, some help would be appreciated, thank you! ; )

[351 byte] By [calaco007a] at [2007-10-2 5:25:33]
# 1
What do you mean by table? JTable? An array of arrays? I'm confused.
kablaira at 2007-7-16 1:27:23 > top of Java-index,Other Topics,Algorithms...
# 2
Could be a database table too.
DrClapa at 2007-7-16 1:27:23 > top of Java-index,Other Topics,Algorithms...
# 3

> I have a table with 4 colums and N rows, i want to

> write data (int) on the 1st and 3rd columns and In

> the 4th column I want to show up the result of 1st X

> 3rd (1st times 3rd), I tried many times but so far

> I've got nothing good, some help would be

> appreciated, thank you! ; )

Here you go:

int n = 10; // number of rows

int[][] table = new int[n][4];

// 4th column from the first row = the 1st column multiplied with the 3rd

table[0][3] = table[0][0] * table[0][2];

prometheuzza at 2007-7-16 1:27:23 > top of Java-index,Other Topics,Algorithms...
# 4
thank you! I solved it, it was a JTable hehe sorry
calaco007a at 2007-7-16 1:27:23 > top of Java-index,Other Topics,Algorithms...