I have a JTable with two columns in my JFrame. The number of rows this table has should equal a number input in a JForm in a previous JFrame. I cannot find any rowCount mutator function (Using Netbeans), and upon further inspection, the rowCount property in the GUI design view is apparently locked. How do i go about my task?
pspwxp fan
1
Junior Poster in Training
Recommended Answers
Jump to PostThe row count tells you the number of rows in yout table's model, just like length() tells you the number of chars in a String. It makes no sense to set it, because then it would be wrong. Just make your model the right size.
Jump to PostJust make your model the right size.
Jump to PostI don't know how to make this any simpler for you. Of course you can dynamically set or change the number of rows in your table. Have you read the API documentation for JTable, or the tutorial which it links to? You just make your model the right size.
JTable …
All 9 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
pspwxp fan
1
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
pspwxp fan
1
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
pspwxp fan
1
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
pspwxp fan
1
Junior Poster in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.