Results 1 to 6 of 6
  1. #1
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default Select a row in Jtable

    Hi,

    I have a situation where I have a screen which shows around 100 of record s.On this screen there is a search button ,if you specify the criterion and click on search it should highlight the record in screen with 100 of records.

    Search button will fire a stored procedure and find one row,that row should be highlighted.How do I make the row highlighted depending on search results.


    Thanks,
    Manshu

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default

    See ListSelectionModel (Java Platform SE 6)
    Java Code:
    table.getSelectionModel().setSelectionInterval

  3. #3
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks for the reply.I will just get a record from the database .
    I do not know the row number,how do I highlight in this case.Is it necessary to highlight with the row number?
    Can I highlight based on the ID which is one column of the table.

    Thanks,

  4. #4
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Someone please help

    Thanks,

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default

    So, is this a Swing question or JDBC?

    db

  6. #6
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Its swing as well ,I want to know that is there any way to find the row number or my stored procedure should return the row number

Similar Threads

  1. Auto select JCombo box Adding to JTable
    By kasiram.p@gmail.com in forum AWT / Swing
    Replies: 0
    Last Post: 01-03-2011, 06:08 AM
  2. Problems with Shift select in Jtable
    By kovski88 in forum Advanced Java
    Replies: 0
    Last Post: 01-28-2010, 04:04 PM
  3. 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
  4. result select sql in jtable
    By herfnai in forum JDBC
    Replies: 0
    Last Post: 08-17-2008, 12:20 PM
  5. result select sql in jtable
    By herfnai in forum JDBC
    Replies: 0
    Last Post: 08-17-2008, 12:20 PM

Posting Permissions

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