how to change Jtable image from one column to another column using mouse click event?
I am trying to use the following java class to add an image to a Jtable. It has worked properly. My problem is when I try to change the third column picture to second column (swap) using a mouse click event. But it will not work. I change the place of testIcon2 , testIcon1 in the mouse click event. First I load the image like Object[][] data = {{testIcon, "book1"}, {testIcon1, "book2"}, {testIcon2, "book3"}, {testIcon3, "book4"}}; In mouse click: Object[][] data1 = {{testIcon, "book1"}, {testIcon2, "book2"}, {testIcon1, "book3"}, {testIcon3, "book4"}}; How to change the second column image to