JTable with ListSelectionListener and getSelectedRow

The getSelectionRow () returns an integer value of the selected row . Program       Program Source import javax.swing.JFrame; import javax.swing.JTable; import javax.swing.JTextArea; import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionEvent; import java.awt.Dimension; import java.awt.FlowLayout; class Frame extends JFrame implements ListSelectionListener{ private JTable jt; private JTextArea ta; private ListSelectionModel ls; private String[] heading = … Read more…