Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > get data from JTable

Reply
Thread Tools

get data from JTable

 
 
Raspberry
Guest
Posts: n/a
 
      10-01-2007
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

 
Reply With Quote
 
 
 
 
voorth
Guest
Posts: n/a
 
      10-02-2007
On Oct 2, 1:10 am, Raspberry <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Putting a JTable inside a JTable cell? Tivo Escobar Java 1 04-12-2007 11:09 AM
How to move data from a CSV file to a JTable, and from a JTable to a CSV file ? Tintin92 Java 1 02-14-2007 06:51 PM
Get Rows of JTable Ricardo Patricio Java 1 05-24-2004 06:32 PM
JTable and AbstractTableModel (with data from multiple access tables) Dinobe Java 2 05-12-2004 07:52 AM
JTable problem: set/get cell value on focuslost Markus Puustinen Java 1 02-24-2004 12:36 PM



Advertisments