get data from JTable

Discussion in 'Java' started by Raspberry, Oct 2, 2007.

  1. Raspberry

    Raspberry Guest

    Hi all,

    I have a JTable retrieve, insert and delete from DB . and I have JList
    display data of each column using table.getValueat(row, column)
    the problem is I want to select values of column distinctly ( no
    repeated data )without using SELECT statement
    Is there is anyway to do this without coccnect to database ?

    thanks in advance
     
    Raspberry, Oct 2, 2007
    #1
    1. Advertising

  2. Raspberry

    voorth Guest

    On Oct 2, 1:10 am, Raspberry <> wrote:
    > Hi all,
    >
    > I have a JTable retrieve, insert and delete from DB . and I have JList
    > display data of each column using table.getValueat(row, column)
    > the problem is I want to select values of column distinctly ( no
    > repeated data )without using SELECT statement
    > Is there is anyway to do this without coccnect to database ?
    >
    > thanks in advance


    Read the column and add the values to a java.util.Set
    This will give you all distinct values.

    --Henk
     
    voorth, Oct 2, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tivo Escobar
    Replies:
    1
    Views:
    7,536
    manusa
    Apr 12, 2007
  2. Markus Puustinen
    Replies:
    1
    Views:
    10,928
    Kleopatra
    Feb 24, 2004
  3. Ricardo Patricio

    Get Rows of JTable

    Ricardo Patricio, May 24, 2004, in forum: Java
    Replies:
    1
    Views:
    7,668
    Corey Brown
    May 24, 2004
  4. Tintin92
    Replies:
    1
    Views:
    1,806
    Andrew Thompson
    Feb 14, 2007
  5. Haircuts Are Important
    Replies:
    3
    Views:
    412
    Haircuts Are Important
    Jun 4, 2013
Loading...

Share This Page