Results 1 to 2 of 2
  1. #1
    asai is offline Senior Member
    Join Date
    Feb 2012
    Rep Power

    Default Select a row in a table


    I have a table that display all the content from a MySQL table.
    Now I would like to add a button that gets all the details from the highlighted row in my table.
    Any suggestions on how to write this code?

  2. #2
    gauravfzd's Avatar
    gauravfzd is offline Member
    Join Date
    Oct 2010
    Rep Power

    Default Re: Select a row in a table

    There is a method in JTable by which you can access the selected row in the table. I don't remember it correctly but I think it is getSelectedRow() . If not then consider the J2SE Javadoc to get the method of JTable class.
    You can also get the data for a particular cell intersected by a partucalar row and column indexes....

    Build a habit to refer the Javadoc......

Similar Threads

  1. Replies: 3
    Last Post: 02-23-2012, 09:30 AM
  2. Replies: 1
    Last Post: 09-27-2011, 06:06 AM
  3. java method to select from diffrent table
    By waboke in forum New To Java
    Replies: 2
    Last Post: 04-24-2010, 01:58 PM
  4. Replies: 1
    Last Post: 01-08-2010, 06:19 AM
  5. How to retain value in struts 2 using <s:select></s:select> tag
    By SaiPrasad@Sella in forum Web Frameworks
    Replies: 0
    Last Post: 02-09-2009, 07:23 AM

Posting Permissions

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