ZeroCool ZeroCool - 1 year ago 71
Java Question

Java JTable getting the data of the selected row

Are there any methods that are used to get the data of the selected row? I just want to simply click a specific row with data on it and click a button that will print the data in the Console.

enter image description here

Answer Source

A quick google would've given you multiple links with answers in it. Nonetheless, you should read this page:

You will find these methods in it:

getValueAt(int row, int column)

Use a mix of these to achieve your result.