Hello All! I'm a bit new to Java, and certainly to the community. I'd appreciate any and all pointers to the right direction!
I have a JTable that I have populated with a 2 dimensional array. During the period of the data sitting there, it will be modified. When finished, I would of course like to export it back to a 2 dimensional array.
I really have no clue on the best way of doing this. I assume JTables do not have a 2-dim array for it's backend, and probably uses a vector or something.
My first attempt at a solution was to create a new 2 dim array with dimensions JTable.getColum nlCount() and JTable.getRowCo unt(). When I do this though, I'm continually getting out of bounds exceptions. I presume this comes from the rowCount and ColCount methods not actually being the size of everything I'm reading it.
Does anyone know what's causing this, or better yet a superior way to export my data to an array?
THANKS!
Rob
I have a JTable that I have populated with a 2 dimensional array. During the period of the data sitting there, it will be modified. When finished, I would of course like to export it back to a 2 dimensional array.
I really have no clue on the best way of doing this. I assume JTables do not have a 2-dim array for it's backend, and probably uses a vector or something.
My first attempt at a solution was to create a new 2 dim array with dimensions JTable.getColum nlCount() and JTable.getRowCo unt(). When I do this though, I'm continually getting out of bounds exceptions. I presume this comes from the rowCount and ColCount methods not actually being the size of everything I'm reading it.
Does anyone know what's causing this, or better yet a superior way to export my data to an array?
THANKS!
Rob
Comment