Java Basic Problems

Java:How to count the number of JTable row and column?

If you want to count the number of Row and Column of your JTable,then just add the below lines in your code

 int noc=table.getColumnCount();

 int nor=table.getRowCount();


Here table is the name of the JTable you declared in your code.

 Also you can see “How to add data in JTable without using TableModel