This will give you the selected row and the selected column from the JTable
. If no cell is selected then getSelectedXXX method will return -1.
table.getSelectedColumn(); // Gives the selected column.
table.getSelectedRow(); // Gives the selected row.
After getting the row and the column call getValueAt method to get the value at that position.
Now you have the required data with you and you can store it in the array and pass it to another class for visualization.