Originally posted by Roopa Joshi:
I have an applet, where i am showing status of some elements. I am using grid layout with six rows. If user clicks on any of the row, I have to show the same layout with two more button added to it in the row where the user has clicked.
Is there any way of knowing in which row user has clicked.
Thanks in advance
The best way is to do away with the layout and Use a JTable control to display the widgets. You can get the row number and column number from the Tables model when it is clicked.
Do not get bogged down by the complexity of te JTAble, actually it is very easy to use.
Sachin