I have a program where the user clicks on the screen and the coordinate of that click is stored in an array. Where the user clicked a point is drawn.

I want to display these values in a JTable. The only thing is it has to be associated, so changes can be made either way.

So for example if I want to change the x coordinate of a particular click I can do that from the table and it will be displayed on the screen.

Can I have some ideas on how I could make this association?