Click to See Complete Forum and Search --> : determining row # in a JTable
laneh
September 26th, 2000, 09:14 AM
I have a JTable that has custom components inside of it. Some of them are Radio Buttons, and to get the radio buttons working I had to implement a RadioButton Listener class. Now that I have a listener class for the radio buttons I need a way to determine the row they are in from the item listener. It appears that when I click on the radio buttons, the item listener is called before the table selection happens. I also have a MouseMotionListener on my custom JTable where I move the X and Y coordinates other variables. Any ideas?
Thanks in advance.
"There are no facts, only interpretations."
-Friedrich Nietzsche
laneh
September 26th, 2000, 11:30 AM
I have figured it out. One line of code in the wrong spot..
"There are no facts, only interpretations."
-Friedrich Nietzsche
lalitha
September 26th, 2000, 12:06 PM
can you please write the code for determining the row no. and table selection listner. because i am also working with jtable and i want to get the row no. of selected row. suppose for jtree,there is a listner called TreeSelectionListner but i couldn't found anything like that.
thanks in advance.
laneh
September 26th, 2000, 04:44 PM
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
this will give you all you need to know.
also look @ the online API docs.
"There are no facts, only interpretations."
-Friedrich Nietzsche
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.