This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hiiii........i want to populate a 2-D array using database which will be shown in a swing application using JTable.....i am not getting able to populate 2-d array ...is there any method like fill() for this purpose....
Well, you should not be using a 2D array for this purpose. You don't know how many rows are in your database so you don't know how big to make the array.
Instead you should be using a Vector of Vectors. The main Vector is used to hold the rows of data. Then for each row in the ResultSet you create another Vector and get all the value for that row. Then you add the row vector to the main vector.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: populating 2-D array dynamically with JTable