Create JTable from ArrayList of Objects - Java
How do I display my "Click" objects in a JTable? ArrayList<Click> myClicks = new ArrayList<Click>(); Click click = new Click(620, 1028); Click click2 = new Click(480, 230); myClicks.add(click); myClicks.add(click2); It should look something like this: |---Mouse X---|---Mouse Y---| | 620 | 1028 | | 480 | 230 | Which is really... | | v v click.getX() click.getY() click2.getX() click2.getY() I don't want to use a 2D Object[][] because it makes more sense to keep them as Click objects as long as possible. I know I probably have to extend the TableModel interface but I'm not sure how. I'd just like