adding rows to coloumns. Netbeans
I am making simple GUI application in Netbeans6.5.
I want to add row through code during run time of program.
I have one jtable and one jbutton on the frame .
If i press jbutton then there should be addition of one row in the jtable for this i have added the following code in jbutton action performed function
But i am not able to achieve the task . the number of rows same as that were in the beginning i.e. number of rows are not increasing on pressing the jbutton
Also i have refreshed the jframe for that but still it doesn't work
Please tell me the solution for that.
Re: adding rows to coloumns
Sorry for the late reply.
add row in jTable use Netbeans. - Java
The row must be added to the TableModel, not the JTable as you are attempting.
Appending a Row to a JTable Component (Java Developers Almanac Example)
I hope these links help to solve your problem.