Original Post
I am writing a turn based 2D tile playing game and have picked the TableLayout mamanger from Sun for the playing area. I have seen several references to this layout manger for this application so I am assuming it's been used successfully. I have a Tile class that extends JLabel and overrides paintComponent for painting. That seems to work well. I can't seem to figure out a couple of really simple things though: 1. How do I take a mouse click and figure out which row,col I clicked on? I have a mouseListener added and can get the x,y point in the panel but there must be an easy way to get the integer row,col from the table. 2. Once I have a row,col for the table how do I get the corresponding component I stuffed in there? The only way I've found is to use Container.getComponent(point x) which seems round-about given I've got a table based layout manager. Thanks!