How to set the text of a TextField to a highlighted row in a JTable?
Hope ya'll are doing great.
Just a simple question: I have a JTable with data about cars in one interface (with a button called "deal") and a few JTextFields in another interface. The JTextFields correspond to the car details (i.e. "model", "make", "year" etc). Now, what I want to do is, when I click on (highlight) a row on the JTable then click on "deal", I want the JTextFields in the other interface to be filled with the corresponding car details. I think I'm supposed to use mouseListener but I'm not quite sure how to go about it.