CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2000
    Location
    Texas
    Posts
    22

    determining row # in a JTable

    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

  2. #2
    Join Date
    Sep 2000
    Location
    Texas
    Posts
    22

    Re: determining row # in a JTable

    I have figured it out. One line of code in the wrong spot..

    "There are no facts, only interpretations."
    -Friedrich Nietzsche

  3. #3
    Join Date
    Jul 1999
    Posts
    17

    Re: determining row # in a JTable

    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.


  4. #4
    Join Date
    Sep 2000
    Location
    Texas
    Posts
    22

    Re: determining row # in a JTable

    http://java.sun.com/docs/books/tutor...nts/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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured