Forums Register Login

How to get the contents of the selected JTable row?

+Pie Number of slices to send: Send
I know I can use JTable.getSelectedRow() to get the index of the selected row. Can I get the contents of the selected JTable row directly?
Assuming I am using AbstractTableModle.
Thanks
Bruce
+Pie Number of slices to send: Send
Hi Bruce,
You can only get one cell value at a time.
getValueAt( row, col );
using the row you already have and making use of:
getColumnCount()
method should work for you.
Regards,
Manfred.
+Pie Number of slices to send: Send
Thank you Manfred!
Bruce
Message for you sir! I think it is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1474 times.
Similar Threads
Jtable
jtable
JTable
JTable
JTable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:07:44.